From f699bd23321b7561907b0feb4f2972832bd8abe3 Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 12 May 2015 18:30:11 +0000 Subject: [PATCH 01/90] update from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10570 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/rapidExtArcDds/MobilitySample.idl | 2 ++ knRapid/src/rapidIo/ImageSensorProvider.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/knRapid/src/rapidExtArcDds/MobilitySample.idl b/knRapid/src/rapidExtArcDds/MobilitySample.idl index c6df1b7..76ba1f0 100644 --- a/knRapid/src/rapidExtArcDds/MobilitySample.idl +++ b/knRapid/src/rapidExtArcDds/MobilitySample.idl @@ -43,6 +43,8 @@ module rapid { public Vec3d xytTolerance; public float hintedSpeed; public String32 navAlgo; + //@copy-declaration /** extension values */ + public KeyTypeValueSequence8 keyedValues; }; // status definitions diff --git a/knRapid/src/rapidIo/ImageSensorProvider.h b/knRapid/src/rapidIo/ImageSensorProvider.h index d1565c5..9eb901e 100644 --- a/knRapid/src/rapidIo/ImageSensorProvider.h +++ b/knRapid/src/rapidIo/ImageSensorProvider.h @@ -38,6 +38,9 @@ namespace rapid class rapidIo_Export ImageSensorProvider { + protected: + typedef kn::DdsTypedSupplier ImageSampleSupplier; + public: ImageSensorProvider(ImageSensorProviderParameters const& params, const std::string& entityName, @@ -50,11 +53,12 @@ namespace rapid char const * mimeType() { return m_mimeType; } void setMimeType(char const * mT); + ImageSampleSupplier& dataSupplier() { return *m_sampleSupplier; } + void publishData(unsigned char const * buffer, int len, ACE_Time_Value const& timestamp = ACE_Time_Value::zero); protected: - typedef kn::DdsTypedSupplier ImageSampleSupplier; // scoped-ptr would be good enough, but requires full type at declaration typedef kn::shared_ptr ImageSampleSupplierPtr; From 348d4e2fdb6afd84ac646583b6fe919513421d9b Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 4 Jun 2015 17:34:31 +0000 Subject: [PATCH 02/90] merge from roversw trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10572 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/rapidIo/ImageSensorProvider.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/knRapid/src/rapidIo/ImageSensorProvider.h b/knRapid/src/rapidIo/ImageSensorProvider.h index 9eb901e..c229d48 100644 --- a/knRapid/src/rapidIo/ImageSensorProvider.h +++ b/knRapid/src/rapidIo/ImageSensorProvider.h @@ -23,6 +23,8 @@ #include +#include "rapidDds/ImageSensorSample.h" + #include "knShare/SmartPtr.h" namespace kn @@ -32,7 +34,7 @@ namespace kn } namespace rapid { - class ImageSensorSample; + //class ImageSensorSample; class ImageMetadata; class ImageSensorProviderParameters; @@ -40,6 +42,8 @@ namespace rapid { protected: typedef kn::DdsTypedSupplier ImageSampleSupplier; + // scoped-ptr would be good enough, but requires full type at declaration + typedef kn::shared_ptr ImageSampleSupplierPtr; public: ImageSensorProvider(ImageSensorProviderParameters const& params, @@ -53,15 +57,17 @@ namespace rapid char const * mimeType() { return m_mimeType; } void setMimeType(char const * mT); - ImageSampleSupplier& dataSupplier() { return *m_sampleSupplier; } + /** FIXME: this should be dataSupplier() that returns a ImageSampleSupplier& + * but that is generating a cryptic error. Look into the error and make + * this method consistent with the analogous Provider_T method + */ + ImageSampleSupplierPtr dataSupplierPtr() { return m_sampleSupplier; } + //ImageSampleSupplier& dataSupplier() { return *m_sampleSupplier; } void publishData(unsigned char const * buffer, int len, ACE_Time_Value const& timestamp = ACE_Time_Value::zero); protected: - // scoped-ptr would be good enough, but requires full type at declaration - typedef kn::shared_ptr ImageSampleSupplierPtr; - ImageSampleSupplierPtr m_sampleSupplier; rapid::ImageMetadata& m_metadata; char * m_mimeType; From 87c46d97944e5105915905d961e09c0f4d125a81 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 17 Jul 2015 14:14:40 -0700 Subject: [PATCH 03/90] changes for soraCore building under catkin Most of the toplevel stuff is straight forward. There are a bunch of changes on the idl-generated include paths. RTI-DDS idl-compiler can't handle nested includes. But include destinations in build/ slightly changes. --- irgUtil/src/irgUtmll/CMakeLists.txt | 3 +- knDds/CMakeLists.txt | 62 ++++++++++++++----- knDds/package.xml | 14 +++++ knDds/src/knDds/CMakeLists.txt | 1 + knRapid/CMakeLists.txt | 57 +++++++++++++---- .../examples/dds/HelloWorld/CMakeLists.txt | 2 +- knRapid/package.xml | 16 +++++ knRapid/src/CMakeLists.txt | 4 +- knRapid/src/knProcessManager/CMakeLists.txt | 2 +- knRapid/src/rapidExtArcIo/CMakeLists.txt | 2 +- knRapid/src/rapidExtIo/CMakeLists.txt | 2 +- knRapid/src/rapidExtTraclabsIo/CMakeLists.txt | 2 +- 12 files changed, 134 insertions(+), 33 deletions(-) create mode 100644 knDds/package.xml create mode 100644 knRapid/package.xml diff --git a/irgUtil/src/irgUtmll/CMakeLists.txt b/irgUtil/src/irgUtmll/CMakeLists.txt index 73d1a2a..e3a66b4 100644 --- a/irgUtil/src/irgUtmll/CMakeLists.txt +++ b/irgUtil/src/irgUtmll/CMakeLists.txt @@ -28,7 +28,8 @@ add_library(${LIB_NAME} SHARED set( TARGETS utmToLatLon - latLonToUtm + latLonToUtm + latLonToUtmCsv ) foreach( TEST_TARGET ${TARGETS} ) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 495d381..287c48f 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -1,15 +1,25 @@ +cmake_minimum_required(VERSION 2.8.3) project(knDds) -cmake_minimum_required(VERSION 2.6) -set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) +if (${CATKIN_TOPLEVEL}) + find_package(catkin REQUIRED COMPONENTS + irg_cmake + kn + Miro + ) +endif(${CATKIN_TOPLEVEL}) + +if (catkin_FOUND) +################################### +## catkin specific configuration ## +################################### +catkin_package( + INCLUDE_DIRS src + LIBRARIES knDds knDdsUtil + ) +else (catkin_FOUND) -if( CMAKE_COMPILER_IS_GNUCXX ) - message( STATUS "****************************************************") - message( STATUS "** Manually setting compiler flags to prevent") - message( STATUS "** strict-aliasing warnings in DDS generated files") - message( STATUS "****************************************************") - set( WARN_FLAGS "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-write-strings" ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) include( SetArchitecture ) include( SetupBuildSwitch ) @@ -26,11 +36,23 @@ include( UserOptions ) set( KNDDS_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "KNDDS install path") set( CMAKE_INSTALL_PREFIX ${KNDDS_INSTALL_PREFIX} CACHE INTERNAL "" ) +find_package( Miro ) +find_package( kn ) +endif (catkin_FOUND) + + +if( CMAKE_COMPILER_IS_GNUCXX ) + message( STATUS "****************************************************") + message( STATUS "** Manually setting compiler flags to prevent") + message( STATUS "** strict-aliasing warnings in DDS generated files") + message( STATUS "****************************************************") + set( WARN_FLAGS "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-write-strings" ) +endif( CMAKE_COMPILER_IS_GNUCXX ) #--------------------------------------------- # make RTI DDS optional add_build_var( WITH_DDS NOT APPLE ) -find_package_if( RtiDds KNDDS_BUILD_WITH_DDS ) +find_package( RtiDds ) find_package( ACE ) find_package( Qt4 ) @@ -38,9 +60,6 @@ find_package( PThreads-win32 ) find_package( Boost 1.50.0 COMPONENTS program_options filesystem system chrono) -find_package( Miro ) -find_package( kn ) - find_package( Doxygen ) add_build_var( WITH_DDS_LBPlugin NOT APPLE ) @@ -53,6 +72,20 @@ build_with_var( WITH_DDS_LBPlugin RTIDDS_LB_FOUND ) build_with_var( WITH_DDS_Monitor RTIDDS_MON_FOUND ) build_with_var( WITH_RTI_DistLogger RTIDDS_DLOGGER_FOUND ) +## this macro is normally pulled in through the +## FindMiro script +##----------------------------------------------- +include( GenerateMiroMakeParams ) +# we need to tell the macro where to find the executable +# because it isn't "installed" yet... +if (${CATKIN_TOPLEVEL}) + set( MIRO_MAKEPARAMS_EXECUTABLE ${CATKIN_DEVEL_PREFIX}/lib/Miro/MakeParams ) +else (${CATKIN_TOPLEVEL}) + set( MIRO_MAKEPARAMS_EXECUTABLE ${PROJECT_BINARY_DIR}/src/makeParams/${CMAKE_CFG_INTDIR}/MakeParams ) +endif (${CATKIN_TOPLEVEL}) + + + ## We must add the in-source and out-of-source ## include paths ##-------------------------------------------- @@ -64,6 +97,7 @@ include_directories( include_directories( ${KN_INCLUDE_DIR} ${Boost_INCLUDE_DIR} + ${catkin_INCLUDE_DIRS} ) if( WIN32 ) @@ -87,7 +121,7 @@ install_export() # package script #------------------------------------ -include( CMakePack.txt ) +#include( CMakePack.txt ) #------------------------------------ print_build_switches() diff --git a/knDds/package.xml b/knDds/package.xml new file mode 100644 index 0000000..e0e11e1 --- /dev/null +++ b/knDds/package.xml @@ -0,0 +1,14 @@ + + + knDds + 1.0.0 + DDS helpers of soraCore + Hans Utz + + Apache2 + + catkin + irg_cmake + kn + Miro + diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index 57ad0b8..ed30ff2 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -67,6 +67,7 @@ target_link_libraries( ${LIB_NAME} ${MIRO_miroXml_LIBRARY} ${RTIDDS_LIBRARIES} ${KN_knShare_LIBRARY} + ${catkin_LIBRARIES} ) if ( KNDDS_HAS_DDS_LBPlugin ) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index c392def..53fc2d9 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -1,5 +1,25 @@ +cmake_minimum_required(VERSION 2.8.3) project(knRapid) -cmake_minimum_required(VERSION 2.6) + +if (${CATKIN_TOPLEVEL}) + find_package(catkin REQUIRED COMPONENTS + irg_cmake + irgUtil + Miro + kn + knDds + ) +endif(${CATKIN_TOPLEVEL}) + +if (catkin_FOUND) +################################### +## catkin specific configuration ## +################################### +catkin_package( + INCLUDE_DIRS src + LIBRARIES rapidDds rapidIo + ) +else (catkin_FOUND) set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) @@ -32,11 +52,16 @@ include( UserOptions ) set( RAPID_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "RAPID install path") set( CMAKE_INSTALL_PREFIX ${RAPID_INSTALL_PREFIX} CACHE INTERNAL "" ) +find_package( IrgUtil ) +find_package( Miro ) +find_package( kn ) +find_package( knDds ) +endif (catkin_FOUND) #--------------------------------------------- # make RTI DDS optional add_build_var( WITH_DDS NOT APPLE ) -find_package_if( RtiDds KNRAPID_BUILD_WITH_DDS ) +find_package( RtiDds ) find_package( ACE ) find_package( Qt4 ) @@ -46,15 +71,21 @@ find_package( CURL ) find_package( Boost 1.50.0 COMPONENTS program_options filesystem system thread bind function) find_package( Eigen3 ) find_package( Threads ) - -find_package( IrgUtil ) -find_package( Miro ) -find_package( kn ) -find_package( knDds ) - find_package( Doxygen ) -build_with_var( WITH_DDS RTIDDS_FOUND ) +build_with_var( WITH_DDS RTIDDS_FOUND ) + +## this macro is normally pulled in through the +## FindMiro script +##----------------------------------------------- +include( GenerateMiroMakeParams ) +# we need to tell the macro where to find the executable +# because it isn't "installed" yet... +if (${CATKIN_TOPLEVEL}) + set( MIRO_MAKEPARAMS_EXECUTABLE ${CATKIN_DEVEL_PREFIX}/lib/Miro/MakeParams ) +else (${CATKIN_TOPLEVEL}) + set( MIRO_MAKEPARAMS_EXECUTABLE ${PROJECT_BINARY_DIR}/src/makeParams/${CMAKE_CFG_INTDIR}/MakeParams ) +endif (${CATKIN_TOPLEVEL}) ## We must add the in-source and out-of-source ## include paths @@ -64,6 +95,7 @@ include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src ${Boost_INCLUDE_DIR} + ${catkin_INCLUDE_DIRS} ) ## Set up RPATH and *Config.h @@ -75,7 +107,10 @@ setup_configure_file() # Defaults #----------------------------------- -link_libraries( ${CMAKE_THREAD_LIBS_INIT} ) +link_libraries( + ${CMAKE_THREAD_LIBS_INIT} + ${catkin_LIBRARIES} +) if( WIN32 ) link_directories( ${Boost_LIBRARY_DIRS} ) @@ -94,7 +129,7 @@ install_export() # package script #------------------------------------ -include( CMakePack.txt ) +#include( CMakePack.txt ) #------------------------------------ print_build_switches() diff --git a/knRapid/examples/dds/HelloWorld/CMakeLists.txt b/knRapid/examples/dds/HelloWorld/CMakeLists.txt index 629b7d6..e9431d1 100644 --- a/knRapid/examples/dds/HelloWorld/CMakeLists.txt +++ b/knRapid/examples/dds/HelloWorld/CMakeLists.txt @@ -8,7 +8,7 @@ rtidds_wrap_idl( ${ALL_IDL_FILENAMES} ) include_directories( ${RTIDDS_INCLUDE_DIR} ) link_libraries( ${RTIDDS_LIBRARIES} ) -add_library( ${LIB_NAME} STATIC +add_library( ${LIB_NAME} ${RTIDDS_IDL_GENERATED} ) diff --git a/knRapid/package.xml b/knRapid/package.xml new file mode 100644 index 0000000..8ad13c4 --- /dev/null +++ b/knRapid/package.xml @@ -0,0 +1,16 @@ + + + knRapid + 1.0.0 + Rapid Implementation of soraCore + Hans Utz + + Apache2 + + catkin + irg_cmake + irgUtil + kn + knDds + Miro + diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index cdf8452..044b078 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -14,9 +14,9 @@ add_build_switch( rapidExtTraclabsIo KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( rapidCommanding KNRAPID_HAS_DDS ) #AND NOT WIN32 ) # compile failure in ACE_NS_Thread.inl add_build_switch( rapidFrameStore EIGEN3_FOUND) add_build_switch( knFrameStoreSvc EIGEN3_FOUND ) -add_build_switch( knSystemInfo MIRO_miroXml_LIBRARY AND NOT APPLE AND UNIX ) +add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) -add_build_switch( knFetchPool MIRO_miroXml_LIBRARY AND QT_FOUND ) +add_build_switch( knFetchPool QT_FOUND ) add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding AND IRGUTIL_irgSha1_LIBRARY AND KNRAPID_BUILD_knFetchPool ) add_build_switch( knProcessManager KNRAPID_HAS_DDS AND UNIX ) diff --git a/knRapid/src/knProcessManager/CMakeLists.txt b/knRapid/src/knProcessManager/CMakeLists.txt index 305224b..b35a57b 100644 --- a/knRapid/src/knProcessManager/CMakeLists.txt +++ b/knRapid/src/knProcessManager/CMakeLists.txt @@ -38,7 +38,7 @@ include_directories ( ${QT_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/src/rapidDds + ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) link_libraries ( diff --git a/knRapid/src/rapidExtArcIo/CMakeLists.txt b/knRapid/src/rapidExtArcIo/CMakeLists.txt index 6b79a89..df78fe9 100644 --- a/knRapid/src/rapidExtArcIo/CMakeLists.txt +++ b/knRapid/src/rapidExtArcIo/CMakeLists.txt @@ -62,7 +62,7 @@ include_directories( ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/src/rapidDds + ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) link_libraries( diff --git a/knRapid/src/rapidExtIo/CMakeLists.txt b/knRapid/src/rapidExtIo/CMakeLists.txt index 2240a91..aff816d 100644 --- a/knRapid/src/rapidExtIo/CMakeLists.txt +++ b/knRapid/src/rapidExtIo/CMakeLists.txt @@ -57,7 +57,7 @@ include_directories( ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/src/rapidDds + ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) link_libraries( diff --git a/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt b/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt index 362f72a..b39f379 100644 --- a/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt +++ b/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt @@ -31,7 +31,7 @@ include_directories( ${KNDDS_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/src/rapidDds + ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) link_libraries( From 7d396ec26f3c40ce903a9dd44f8cd03351c08f90 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 24 Jul 2015 15:25:22 -0700 Subject: [PATCH 04/90] removing test target has nothing to do with catkin build... --- irgUtil/src/irgUtmll/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/irgUtil/src/irgUtmll/CMakeLists.txt b/irgUtil/src/irgUtmll/CMakeLists.txt index e3a66b4..8fe6c06 100644 --- a/irgUtil/src/irgUtmll/CMakeLists.txt +++ b/irgUtil/src/irgUtmll/CMakeLists.txt @@ -29,7 +29,6 @@ add_library(${LIB_NAME} SHARED set( TARGETS utmToLatLon latLonToUtm - latLonToUtmCsv ) foreach( TEST_TARGET ${TARGETS} ) From dfade0da931f34718693c2ecd30a51991840dcdc Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 13 Aug 2015 22:47:09 +0000 Subject: [PATCH 05/90] update FindCGAL git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10585 71bd3d61-4118-0410-985d-8aea7a627388 --- cmake/Modules/FindCGAL.cmake | 24 ++++++++++++++++++++- cmake/Modules/GenerateMiroMakeParams.cmake | 25 +++++++++++++++++++++- cmake/Modules/GenerateRtiDdsIdl.cmake | 21 ++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindCGAL.cmake b/cmake/Modules/FindCGAL.cmake index b44ea93..47167fb 100644 --- a/cmake/Modules/FindCGAL.cmake +++ b/cmake/Modules/FindCGAL.cmake @@ -8,6 +8,21 @@ # CGAL_LIBRARIES : all libraries in one variable (use this in your CMakeLists) # CGAL_LIBRARY_DIR : library path # CGAL_CGAL_LIBRARY : full path to library +# +# NOTE: CGAL has changed their naming conventions +# over the years, e.g. CGALimageIO is now CGAL_ImageIO +# This find script tries to find the old and the +# new, so it's guaranteed to print a warning about +# libraries it did not find. +# +# NEW LIBRARY VARIABLES: +#-------------------------- +# CGAL_CGAL_Core_LIBRARY +# CGAL_CGAL_ImageIO_LIBRARY +# CGAL_CGAL_Qt4_LIBRARY +# +# OLD LIBRARY VARIABLES: +# ------------------------- # CGAL_CGALQt_LIBRARY : full path to library # CGAL_CGALPDB_LIBRARY : full path to library # CGAL_CGALimageIO_LIBRARY : full path to library @@ -20,7 +35,7 @@ include( SimplePackageFind ) set( PACKAGE_NAME CGAL ) set( PACKAGE_DIRS CGAL ) set( PACKAGE_REQ_LIBRARY CGAL ) -set( PACKAGE_REQ_INCLUDE CGAL/CGALversion.h ) +set( PACKAGE_REQ_INCLUDE CGAL/version.h CGAL/CGALversion.h ) simple_package_find("${PACKAGE_NAME}" "${PACKAGE_DIRS}" @@ -28,10 +43,17 @@ simple_package_find("${PACKAGE_NAME}" "${PACKAGE_REQ_INCLUDE}" ) +# NOTE: CGAL has changed their naming conventions +# over the years, e.g. CGALimageIO is now CGAL_ImageIO +# This find script tries to find the old and the +# new, so it's guaranteed to ################################################ if( ${PACKAGE_FOUND} ) set( LIBRARY_NAMES CGAL + CGAL_Core + CGAL_ImageIO + CGAL_Qt4 CGALQt CGALPDB CGALimageIO diff --git a/cmake/Modules/GenerateMiroMakeParams.cmake b/cmake/Modules/GenerateMiroMakeParams.cmake index 0c75e32..a466139 100644 --- a/cmake/Modules/GenerateMiroMakeParams.cmake +++ b/cmake/Modules/GenerateMiroMakeParams.cmake @@ -98,7 +98,30 @@ macro( miro_makeparams ) GENERATED True ) - # install source xml config + ## copy header to devel/include if we are using catkin + ##--------------------------------------------------- + if( catkin_FOUND ) + set( PARAMS_OUTPUT_TARGET MiroParams_${PARAMS_BASE} ) + add_custom_target( ${PARAMS_OUTPUT_TARGET} ALL DEPENDS ${PARAMS_OUTPUT} ) + + # extract "module" path. Assumes directories are named as ${PROJECT}/src/${MODULE} + string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/[^/]*/src/" "" MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) + set( PARAMS_DEVEL_DEST ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}/${MODULE_PATH}/${PARAMS_PATH}/ ) + add_custom_command( + TARGET ${PARAMS_OUTPUT_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PARAMS_BASE_FULL_PATH}.h ${PARAMS_DEVEL_DEST}/${PARAMS_BASE}.h + ) + message(STATUS "****" ) + message(STATUS "**** CATKIN_PACKAGE_INCLUDE_DESTINATION=${CATKIN_PACKAGE_INCLUDE_DESTINATION}" ) + message(STATUS "**** CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" ) + message(STATUS "**** CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}" ) + message(STATUS "**** CATKIN_DEVEL_PREFIX=${CATKIN_DEVEL_PREFIX}" ) + message(STATUS "**** MODULE_PATH=${MODULE_PATH}" ) + endif( catkin_FOUND ) + + ## install source xml config + ##--------------------------------------------------- if( MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR ) install_files( ${MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR} FILES ${PARAMS_FILENAME} ) endif( MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR ) diff --git a/cmake/Modules/GenerateRtiDdsIdl.cmake b/cmake/Modules/GenerateRtiDdsIdl.cmake index 3edd6e9..67bf91c 100644 --- a/cmake/Modules/GenerateRtiDdsIdl.cmake +++ b/cmake/Modules/GenerateRtiDdsIdl.cmake @@ -165,6 +165,27 @@ macro( rtidds_wrap_idl ) ${RTIDDS_IDL_GENERATED_XMLS} ) + ## copy header to devel/include if we are using catkin + ## and header is under ${PROJECT}/src/... + ##--------------------------------------------------- + string( REGEX MATCH "${CMAKE_SOURCE_DIR}/.*/src/.*" IS_SRC_MODULE ${CMAKE_CURRENT_SOURCE_DIR} ) + if( catkin_FOUND AND IS_SRC_MODULE ) + # extract "module" path. Requires that directories are named ${PROJECT}/src/${MODULE} + string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/src/" "" MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) + + set( RTIDDSIDL_OUTPUT_TARGET RtiDdsIdl_${IDL_BASE} ) + add_custom_target( ${RTIDDSIDL_OUTPUT_TARGET} ALL DEPENDS ${IDL_OUTPUT_FILES} ) + + set( RTIDDSIDL_DEVEL_DEST ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${MODULE_PATH}/ ) + foreach( IDL_GENERATED_HEADER ${RTIDDS_IDL_GENERATED_HEADERS} ) + get_filename_component( IDL_HEADER_FILENAME ${IDL_GENERATED_HEADER} NAME ) + add_custom_command( + TARGET ${RTIDDSIDL_OUTPUT_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${IDL_GENERATED_HEADER} ${RTIDDSIDL_DEVEL_DEST}/${IDL_HEADER_FILENAME} + ) + endforeach() + endif( catkin_FOUND AND IS_SRC_MODULE ) endforeach( IDL_FILENAME ) endmacro( rtidds_wrap_idl ) From 528acc08fcd20536c03eea006655deaf016f0b64 Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 13 Aug 2015 23:11:16 +0000 Subject: [PATCH 06/90] revert changes to inadvertently committed files git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10586 71bd3d61-4118-0410-985d-8aea7a627388 --- cmake/Modules/GenerateMiroMakeParams.cmake | 25 +--------------------- cmake/Modules/GenerateRtiDdsIdl.cmake | 21 ------------------ 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/cmake/Modules/GenerateMiroMakeParams.cmake b/cmake/Modules/GenerateMiroMakeParams.cmake index a466139..0c75e32 100644 --- a/cmake/Modules/GenerateMiroMakeParams.cmake +++ b/cmake/Modules/GenerateMiroMakeParams.cmake @@ -98,30 +98,7 @@ macro( miro_makeparams ) GENERATED True ) - ## copy header to devel/include if we are using catkin - ##--------------------------------------------------- - if( catkin_FOUND ) - set( PARAMS_OUTPUT_TARGET MiroParams_${PARAMS_BASE} ) - add_custom_target( ${PARAMS_OUTPUT_TARGET} ALL DEPENDS ${PARAMS_OUTPUT} ) - - # extract "module" path. Assumes directories are named as ${PROJECT}/src/${MODULE} - string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/[^/]*/src/" "" MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) - set( PARAMS_DEVEL_DEST ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}/${MODULE_PATH}/${PARAMS_PATH}/ ) - add_custom_command( - TARGET ${PARAMS_OUTPUT_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PARAMS_BASE_FULL_PATH}.h ${PARAMS_DEVEL_DEST}/${PARAMS_BASE}.h - ) - message(STATUS "****" ) - message(STATUS "**** CATKIN_PACKAGE_INCLUDE_DESTINATION=${CATKIN_PACKAGE_INCLUDE_DESTINATION}" ) - message(STATUS "**** CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" ) - message(STATUS "**** CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}" ) - message(STATUS "**** CATKIN_DEVEL_PREFIX=${CATKIN_DEVEL_PREFIX}" ) - message(STATUS "**** MODULE_PATH=${MODULE_PATH}" ) - endif( catkin_FOUND ) - - ## install source xml config - ##--------------------------------------------------- + # install source xml config if( MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR ) install_files( ${MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR} FILES ${PARAMS_FILENAME} ) endif( MIRO_MAKEPARAMS_CONFIG_INSTALL_DIR ) diff --git a/cmake/Modules/GenerateRtiDdsIdl.cmake b/cmake/Modules/GenerateRtiDdsIdl.cmake index 67bf91c..3edd6e9 100644 --- a/cmake/Modules/GenerateRtiDdsIdl.cmake +++ b/cmake/Modules/GenerateRtiDdsIdl.cmake @@ -165,27 +165,6 @@ macro( rtidds_wrap_idl ) ${RTIDDS_IDL_GENERATED_XMLS} ) - ## copy header to devel/include if we are using catkin - ## and header is under ${PROJECT}/src/... - ##--------------------------------------------------- - string( REGEX MATCH "${CMAKE_SOURCE_DIR}/.*/src/.*" IS_SRC_MODULE ${CMAKE_CURRENT_SOURCE_DIR} ) - if( catkin_FOUND AND IS_SRC_MODULE ) - # extract "module" path. Requires that directories are named ${PROJECT}/src/${MODULE} - string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/src/" "" MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) - - set( RTIDDSIDL_OUTPUT_TARGET RtiDdsIdl_${IDL_BASE} ) - add_custom_target( ${RTIDDSIDL_OUTPUT_TARGET} ALL DEPENDS ${IDL_OUTPUT_FILES} ) - - set( RTIDDSIDL_DEVEL_DEST ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${MODULE_PATH}/ ) - foreach( IDL_GENERATED_HEADER ${RTIDDS_IDL_GENERATED_HEADERS} ) - get_filename_component( IDL_HEADER_FILENAME ${IDL_GENERATED_HEADER} NAME ) - add_custom_command( - TARGET ${RTIDDSIDL_OUTPUT_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${IDL_GENERATED_HEADER} ${RTIDDSIDL_DEVEL_DEST}/${IDL_HEADER_FILENAME} - ) - endforeach() - endif( catkin_FOUND AND IS_SRC_MODULE ) endforeach( IDL_FILENAME ) endmacro( rtidds_wrap_idl ) From ae20feeb3c626c487c9a8bcc5a48bb4f0edd4bbf Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 13 Aug 2015 23:12:39 +0000 Subject: [PATCH 07/90] update from roversw git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10587 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/knFrameStoreSvc/CMakeLists.txt | 1 + knRapid/src/knFrameStoreSvc/Mvp2014Frames.xml | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 knRapid/src/knFrameStoreSvc/Mvp2014Frames.xml diff --git a/knRapid/src/knFrameStoreSvc/CMakeLists.txt b/knRapid/src/knFrameStoreSvc/CMakeLists.txt index 4d4818a..21ed6e9 100644 --- a/knRapid/src/knFrameStoreSvc/CMakeLists.txt +++ b/knRapid/src/knFrameStoreSvc/CMakeLists.txt @@ -73,6 +73,7 @@ add_target_definitions( ${LIB_NAME} ${EXPORT_DEFINE} ) set (CONFIG_FILES MarscapeFrames.xml RoverscapeFrames.xml + Mvp2014Frames.xml FieldTestSiteFrames.xml K10RedFrames.xml K10RedUpdaterConfig.xml diff --git a/knRapid/src/knFrameStoreSvc/Mvp2014Frames.xml b/knRapid/src/knFrameStoreSvc/Mvp2014Frames.xml new file mode 100644 index 0000000..f375b04 --- /dev/null +++ b/knRapid/src/knFrameStoreSvc/Mvp2014Frames.xml @@ -0,0 +1,42 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
From b233f93a59f9f89f074dca3681edfd0ff52b2f8b Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 27 Aug 2015 14:01:39 -0700 Subject: [PATCH 08/90] adding relative include path --- knRapid/src/rapidIo/PointCloudProvider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knRapid/src/rapidIo/PointCloudProvider.h b/knRapid/src/rapidIo/PointCloudProvider.h index 1068e1d..223e9bd 100644 --- a/knRapid/src/rapidIo/PointCloudProvider.h +++ b/knRapid/src/rapidIo/PointCloudProvider.h @@ -20,7 +20,7 @@ #define rapid_PointCloudProvider_h #include "rapidIo_Export.h" -#include "RapidIoParameters.h" +#include "rapidIo/RapidIoParameters.h" #include "PointCloudIo.h" #include "rapidUtil/Provider_T.h" From c7b6b344bf1d505a341cfdade57c4a80faa26fc3 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 27 Aug 2015 14:07:07 -0700 Subject: [PATCH 09/90] adding include directories this is a hack. but we have yet to figure out how to add a devel/install-space path with apropriate qualifiers. --- knRapid/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 53fc2d9..59ef80e 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -16,8 +16,8 @@ if (catkin_FOUND) ## catkin specific configuration ## ################################### catkin_package( - INCLUDE_DIRS src - LIBRARIES rapidDds rapidIo + INCLUDE_DIRS src ../../../devel/include/rapidDds/ ../../../devel/include/rapidExtDds/ ../../../devel/include/rapidExtArcDds/ + LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding ) else (catkin_FOUND) From 5dd45026a27a12251d1ae713c9a817f00a355830 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Mon, 31 Aug 2015 12:56:54 -0700 Subject: [PATCH 10/90] add extras file for kn, knDds, and knRapid to allow them to be used as catkin packages. --- kn/CMakeLists.txt | 45 +++++--- kn/cmake/kn-extras.cmake.develspace.in | 1 + knDds/CMakeLists.txt | 79 ++++++------- knDds/cmake/knDds-extras.cmake.develspace.in | 1 + knRapid/CMakeLists.txt | 106 +++++++++--------- .../cmake/knRapid-extras.cmake.develspace.in | 11 ++ .../knRapid-extras.cmake.installspace.in | 11 ++ 7 files changed, 148 insertions(+), 106 deletions(-) create mode 100644 kn/cmake/kn-extras.cmake.develspace.in create mode 100644 knDds/cmake/knDds-extras.cmake.develspace.in create mode 100644 knRapid/cmake/knRapid-extras.cmake.develspace.in create mode 100644 knRapid/cmake/knRapid-extras.cmake.installspace.in diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index 58cc619..c8a6fbd 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.8.3) project(kn) +################################### +## catkin ## +################################### if (${CATKIN_TOPLEVEL}) find_package(catkin REQUIRED COMPONENTS irg_cmake @@ -8,25 +11,29 @@ if (${CATKIN_TOPLEVEL}) endif(${CATKIN_TOPLEVEL}) if (catkin_FOUND) -################################### -## catkin specific configuration ## -################################### -catkin_package( - INCLUDE_DIRS src - LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare + ################################### + ## catkin specific configuration ## + ################################### + catkin_package( + INCLUDE_DIRS src + LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare + CFG_EXTRAS kn-extras.cmake ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() + else (catkin_FOUND) set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) -include( SetArchitecture ) -include( SetupBuildSwitch ) -include( SetupConfigureFile ) -include( SetupInstall ) -include( SetupRPATH ) -include( SetupCTest ) -include( SetupWarnLevel ) -include( SetupUtilities ) -include( UserOptions ) + include( SetArchitecture ) + include( SetupBuildSwitch ) + include( SetupConfigureFile ) + include( SetupInstall ) + include( SetupRPATH ) + include( SetupCTest ) + include( SetupWarnLevel ) + include( SetupUtilities ) + include( UserOptions ) ## we have to play some tricks to get install ## path to "stick" in Windows @@ -93,3 +100,11 @@ install_export() #------------------------------------ print_build_switches() + +################################### +## catkin extras ## +################################### +if( kn_CFG_EXTRAS_FILE ) + cfg_extras_append_libraries() +endif( kn_CFG_EXTRAS_FILE ) + diff --git a/kn/cmake/kn-extras.cmake.develspace.in b/kn/cmake/kn-extras.cmake.develspace.in new file mode 100644 index 0000000..ce014a9 --- /dev/null +++ b/kn/cmake/kn-extras.cmake.develspace.in @@ -0,0 +1 @@ +# source: kn-extras.cmake.develspace.in diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 287c48f..71b0e23 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.8.3) project(knDds) +################################### +## catkin ## +################################### if (${CATKIN_TOPLEVEL}) find_package(catkin REQUIRED COMPONENTS irg_cmake @@ -10,34 +13,38 @@ if (${CATKIN_TOPLEVEL}) endif(${CATKIN_TOPLEVEL}) if (catkin_FOUND) -################################### -## catkin specific configuration ## -################################### -catkin_package( - INCLUDE_DIRS src - LIBRARIES knDds knDdsUtil + ################################### + ## catkin specific configuration ## + ################################### + catkin_package( + INCLUDE_DIRS src + LIBRARIES knDds knDdsUtil + CFG_EXTRAS knDds-extras.cmake ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() else (catkin_FOUND) -set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) - -include( SetArchitecture ) -include( SetupBuildSwitch ) -include( SetupConfigureFile ) -include( SetupInstall ) -include( SetupRPATH ) -include( SetupUtilities ) -include( SetupWarnLevel ) -include( UserOptions ) - -## we have to play some tricks to get install -## path to "stick" in Windows -##------------------------------------------------ -set( KNDDS_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "KNDDS install path") -set( CMAKE_INSTALL_PREFIX ${KNDDS_INSTALL_PREFIX} CACHE INTERNAL "" ) - -find_package( Miro ) -find_package( kn ) + set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) + + include( SetArchitecture ) + include( SetupBuildSwitch ) + include( SetupConfigureFile ) + include( SetupInstall ) + include( SetupRPATH ) + include( SetupUtilities ) + include( SetupWarnLevel ) + include( UserOptions ) + + ## we have to play some tricks to get install + ## path to "stick" in Windows + ##------------------------------------------------ + set( KNDDS_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "knDds install path") + set( CMAKE_INSTALL_PREFIX ${KNDDS_INSTALL_PREFIX} CACHE INTERNAL "" ) + + find_package( Miro ) + find_package( kn ) + endif (catkin_FOUND) @@ -72,20 +79,6 @@ build_with_var( WITH_DDS_LBPlugin RTIDDS_LB_FOUND ) build_with_var( WITH_DDS_Monitor RTIDDS_MON_FOUND ) build_with_var( WITH_RTI_DistLogger RTIDDS_DLOGGER_FOUND ) -## this macro is normally pulled in through the -## FindMiro script -##----------------------------------------------- -include( GenerateMiroMakeParams ) -# we need to tell the macro where to find the executable -# because it isn't "installed" yet... -if (${CATKIN_TOPLEVEL}) - set( MIRO_MAKEPARAMS_EXECUTABLE ${CATKIN_DEVEL_PREFIX}/lib/Miro/MakeParams ) -else (${CATKIN_TOPLEVEL}) - set( MIRO_MAKEPARAMS_EXECUTABLE ${PROJECT_BINARY_DIR}/src/makeParams/${CMAKE_CFG_INTDIR}/MakeParams ) -endif (${CATKIN_TOPLEVEL}) - - - ## We must add the in-source and out-of-source ## include paths ##-------------------------------------------- @@ -125,3 +118,11 @@ install_export() #------------------------------------ print_build_switches() + +################################### +## catkin extras ## +################################### +if( knDds_CFG_EXTRAS_FILE ) + cfg_extras_append_libraries() +endif( knDds_CFG_EXTRAS_FILE ) + diff --git a/knDds/cmake/knDds-extras.cmake.develspace.in b/knDds/cmake/knDds-extras.cmake.develspace.in new file mode 100644 index 0000000..49d9705 --- /dev/null +++ b/knDds/cmake/knDds-extras.cmake.develspace.in @@ -0,0 +1 @@ +# source: knDds-extras.cmake.develspace.in diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 59ef80e..d25b764 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.8.3) project(knRapid) +################################### +## catkin ## +################################### if (${CATKIN_TOPLEVEL}) find_package(catkin REQUIRED COMPONENTS irg_cmake @@ -12,50 +15,54 @@ if (${CATKIN_TOPLEVEL}) endif(${CATKIN_TOPLEVEL}) if (catkin_FOUND) -################################### -## catkin specific configuration ## -################################### -catkin_package( - INCLUDE_DIRS src ../../../devel/include/rapidDds/ ../../../devel/include/rapidExtDds/ ../../../devel/include/rapidExtArcDds/ - LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding + ################################### + ## catkin specific configuration ## + ################################### + catkin_package( + INCLUDE_DIRS src # NOTE: see knRapid-extras.cmake for additional include dirs + LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding + CFG_EXTRAS knRapid-extras.cmake ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() + else (catkin_FOUND) -set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) - -if( CMAKE_COMPILER_IS_GNUCXX ) - message( STATUS "****************************************************") - message( STATUS "** Manually setting compiler flags to prevent") - message( STATUS "** strict-aliasing warnings in DDS generated files") - message( STATUS "****************************************************") - set( WARN_FLAGS "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-write-strings" ) - - if( NOT SETUP_WARN_LEVEL_HAS_RUN ) - message( STATUS "** disable --as-needed because k10controller *wants* 'unecessary' shared libs to be linked **") - set( CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed" CACHE STRING "" FORCE ) - endif( NOT SETUP_WARN_LEVEL_HAS_RUN ) + set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) + + if( CMAKE_COMPILER_IS_GNUCXX ) + message( STATUS "****************************************************") + message( STATUS "** Manually setting compiler flags to prevent") + message( STATUS "** strict-aliasing warnings in DDS generated files") + message( STATUS "****************************************************") + set( WARN_FLAGS "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-write-strings" ) -endif( CMAKE_COMPILER_IS_GNUCXX ) - -include( SetArchitecture ) -include( SetupBuildSwitch ) -include( SetupConfigureFile ) -include( SetupInstall ) -include( SetupRPATH ) -include( SetupUtilities ) -include( SetupWarnLevel ) -include( UserOptions ) - -## we have to play some tricks to get install -## path to "stick" in Windows -##------------------------------------------------ -set( RAPID_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "RAPID install path") -set( CMAKE_INSTALL_PREFIX ${RAPID_INSTALL_PREFIX} CACHE INTERNAL "" ) - -find_package( IrgUtil ) -find_package( Miro ) -find_package( kn ) -find_package( knDds ) + if( NOT SETUP_WARN_LEVEL_HAS_RUN ) + message( STATUS "** disable --as-needed because k10controller *wants* 'unecessary' shared libs to be linked **") + set( CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed" CACHE STRING "" FORCE ) + endif( NOT SETUP_WARN_LEVEL_HAS_RUN ) + + endif( CMAKE_COMPILER_IS_GNUCXX ) + + include( SetArchitecture ) + include( SetupBuildSwitch ) + include( SetupConfigureFile ) + include( SetupInstall ) + include( SetupRPATH ) + include( SetupUtilities ) + include( SetupWarnLevel ) + include( UserOptions ) + + ## we have to play some tricks to get install + ## path to "stick" in Windows + ##------------------------------------------------ + set( RAPID_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "RAPID install path") + set( CMAKE_INSTALL_PREFIX ${RAPID_INSTALL_PREFIX} CACHE INTERNAL "" ) + + find_package( IrgUtil ) + find_package( Miro ) + find_package( kn ) + find_package( knDds ) endif (catkin_FOUND) #--------------------------------------------- @@ -75,18 +82,6 @@ find_package( Doxygen ) build_with_var( WITH_DDS RTIDDS_FOUND ) -## this macro is normally pulled in through the -## FindMiro script -##----------------------------------------------- -include( GenerateMiroMakeParams ) -# we need to tell the macro where to find the executable -# because it isn't "installed" yet... -if (${CATKIN_TOPLEVEL}) - set( MIRO_MAKEPARAMS_EXECUTABLE ${CATKIN_DEVEL_PREFIX}/lib/Miro/MakeParams ) -else (${CATKIN_TOPLEVEL}) - set( MIRO_MAKEPARAMS_EXECUTABLE ${PROJECT_BINARY_DIR}/src/makeParams/${CMAKE_CFG_INTDIR}/MakeParams ) -endif (${CATKIN_TOPLEVEL}) - ## We must add the in-source and out-of-source ## include paths ## Boost include path is also required everywhere @@ -133,3 +128,10 @@ install_export() #------------------------------------ print_build_switches() + +################################### +## catkin extras ## +################################### +if( knRapid_CFG_EXTRAS_FILE ) + cfg_extras_append_libraries() +endif( knRapid_CFG_EXTRAS_FILE ) diff --git a/knRapid/cmake/knRapid-extras.cmake.develspace.in b/knRapid/cmake/knRapid-extras.cmake.develspace.in new file mode 100644 index 0000000..50c4291 --- /dev/null +++ b/knRapid/cmake/knRapid-extras.cmake.develspace.in @@ -0,0 +1,11 @@ +# source: knRapid-extras.cmake.develspace.in + +## Create INCLUDE_DIR variable for downstream packages that +## include knRapid rtiddsgen generated headers +set(KNRAPID_INCLUDE_DIR @CATKIN_DEVEL_PREFIX@/include + @CATKIN_DEVEL_PREFIX@/include/rapidDds + @CATKIN_DEVEL_PREFIX@/include/rapidExtDds + @CATKIN_DEVEL_PREFIX@/include/rapidExtArcDds ) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) \ No newline at end of file diff --git a/knRapid/cmake/knRapid-extras.cmake.installspace.in b/knRapid/cmake/knRapid-extras.cmake.installspace.in new file mode 100644 index 0000000..23c8a92 --- /dev/null +++ b/knRapid/cmake/knRapid-extras.cmake.installspace.in @@ -0,0 +1,11 @@ +# source: knRapid-extras.cmake.installspace.in + +## Create INCLUDE_DIR variable for downstream packages that +## include knRapid rtiddsgen generated headers +set(KNRAPID_INCLUDE_DIR @CMAKE_INSTALL_PREFIX@/include + @CMAKE_INSTALL_PREFIX@/include/rapidDds + @CMAKE_INSTALL_PREFIX@/include/rapidExtDds + @CMAKE_INSTALL_PREFIX@/include/rapidExtArcDds ) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) \ No newline at end of file From 877c468b01325d20091eee49c65c58d23f3a66e6 Mon Sep 17 00:00:00 2001 From: "Mark B. Allan" Date: Tue, 1 Sep 2015 10:33:32 -0700 Subject: [PATCH 11/90] remove library targets from extras --- kn/CMakeLists.txt | 8 -------- kn/cmake/kn-extras.cmake.develspace.in | 1 - knDds/CMakeLists.txt | 8 -------- knDds/cmake/knDds-extras.cmake.develspace.in | 1 - knRapid/CMakeLists.txt | 6 ------ 5 files changed, 24 deletions(-) delete mode 100644 kn/cmake/kn-extras.cmake.develspace.in delete mode 100644 knDds/cmake/knDds-extras.cmake.develspace.in diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index c8a6fbd..7102df1 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -17,7 +17,6 @@ if (catkin_FOUND) catkin_package( INCLUDE_DIRS src LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare - CFG_EXTRAS kn-extras.cmake ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() @@ -101,10 +100,3 @@ install_export() #------------------------------------ print_build_switches() -################################### -## catkin extras ## -################################### -if( kn_CFG_EXTRAS_FILE ) - cfg_extras_append_libraries() -endif( kn_CFG_EXTRAS_FILE ) - diff --git a/kn/cmake/kn-extras.cmake.develspace.in b/kn/cmake/kn-extras.cmake.develspace.in deleted file mode 100644 index ce014a9..0000000 --- a/kn/cmake/kn-extras.cmake.develspace.in +++ /dev/null @@ -1 +0,0 @@ -# source: kn-extras.cmake.develspace.in diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 71b0e23..b021b67 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -19,7 +19,6 @@ if (catkin_FOUND) catkin_package( INCLUDE_DIRS src LIBRARIES knDds knDdsUtil - CFG_EXTRAS knDds-extras.cmake ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() @@ -119,10 +118,3 @@ install_export() #------------------------------------ print_build_switches() -################################### -## catkin extras ## -################################### -if( knDds_CFG_EXTRAS_FILE ) - cfg_extras_append_libraries() -endif( knDds_CFG_EXTRAS_FILE ) - diff --git a/knDds/cmake/knDds-extras.cmake.develspace.in b/knDds/cmake/knDds-extras.cmake.develspace.in deleted file mode 100644 index 49d9705..0000000 --- a/knDds/cmake/knDds-extras.cmake.develspace.in +++ /dev/null @@ -1 +0,0 @@ -# source: knDds-extras.cmake.develspace.in diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index d25b764..4d6413b 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -129,9 +129,3 @@ install_export() #------------------------------------ print_build_switches() -################################### -## catkin extras ## -################################### -if( knRapid_CFG_EXTRAS_FILE ) - cfg_extras_append_libraries() -endif( knRapid_CFG_EXTRAS_FILE ) From aadb32467cf3683b365478e55cd92e0182da6ef4 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 15 Sep 2015 11:35:36 -0700 Subject: [PATCH 12/90] modify CMakeLists.txt to account for differences between catkin_make and catkin_tools --- irgUtil/CMakeLists.txt | 4 ++-- kn/CMakeLists.txt | 35 ++++++++++++++++++----------------- knDds/CMakeLists.txt | 32 ++++++++++++++++++-------------- knDds/package.xml | 9 ++++++--- knRapid/CMakeLists.txt | 38 +++++++++++++++++++++----------------- knRapid/package.xml | 11 ++++++----- 6 files changed, 71 insertions(+), 58 deletions(-) diff --git a/irgUtil/CMakeLists.txt b/irgUtil/CMakeLists.txt index 42d0e28..c98b0bc 100644 --- a/irgUtil/CMakeLists.txt +++ b/irgUtil/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 2.8.3) project(irgUtil) -if (${CATKIN_TOPLEVEL}) +if (CATKIN_DEVEL_PREFIX) find_package(catkin REQUIRED COMPONENTS irg_cmake ) -endif(${CATKIN_TOPLEVEL}) +endif(CATKIN_DEVEL_PREFIX) if (catkin_FOUND) ################################### diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index 7102df1..80d154d 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -4,24 +4,13 @@ project(kn) ################################### ## catkin ## ################################### -if (${CATKIN_TOPLEVEL}) +if (CATKIN_DEVEL_PREFIX) find_package(catkin REQUIRED COMPONENTS irg_cmake ) -endif(${CATKIN_TOPLEVEL}) +endif(CATKIN_DEVEL_PREFIX) -if (catkin_FOUND) - ################################### - ## catkin specific configuration ## - ################################### - catkin_package( - INCLUDE_DIRS src - LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare - ) - ## set variable with full path of extras file so we can append library info - set_cfg_extras_file() - -else (catkin_FOUND) +if (NOT catkin_FOUND) set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) include( SetArchitecture ) @@ -39,17 +28,29 @@ else (catkin_FOUND) ##------------------------------------------------ set( ${PROJECT_UPPER}_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../${ARCHITECTURE}" CACHE PATH "irg apps install path") set( CMAKE_INSTALL_PREFIX ${${PROJECT_UPPER}_INSTALL_PREFIX} CACHE INTERNAL "" ) -endif (catkin_FOUND) +endif (NOT catkin_FOUND) # find dependencies find_package( ACE REQUIRED ) find_package( Eigen3 ) -find_package( Boost COMPONENTS chrono ) -find_package( Boost 1.46 REQUIRED program_options signals thread system ) +find_package( Boost 1.46 REQUIRED program_options signals thread system chrono ) find_package( GTest ) find_package( Doxygen ) +if (catkin_FOUND) + ################################### + ## catkin specific configuration ## + ################################### + catkin_package( + INCLUDE_DIRS src + LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare + DEPENDS ACE Boost EIGEN3 + ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() +endif( catkin_FOUND ) + ## We must add the in-source and out-of-source ## include paths ##-------------------------------------------- diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index b021b67..7111514 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -4,25 +4,15 @@ project(knDds) ################################### ## catkin ## ################################### -if (${CATKIN_TOPLEVEL}) +if (CATKIN_DEVEL_PREFIX) find_package(catkin REQUIRED COMPONENTS irg_cmake kn Miro ) -endif(${CATKIN_TOPLEVEL}) +endif(CATKIN_DEVEL_PREFIX) -if (catkin_FOUND) - ################################### - ## catkin specific configuration ## - ################################### - catkin_package( - INCLUDE_DIRS src - LIBRARIES knDds knDdsUtil - ) - ## set variable with full path of extras file so we can append library info - set_cfg_extras_file() -else (catkin_FOUND) +if (NOT catkin_FOUND) set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) @@ -44,7 +34,7 @@ else (catkin_FOUND) find_package( Miro ) find_package( kn ) -endif (catkin_FOUND) +endif (NOT catkin_FOUND) if( CMAKE_COMPILER_IS_GNUCXX ) @@ -78,6 +68,20 @@ build_with_var( WITH_DDS_LBPlugin RTIDDS_LB_FOUND ) build_with_var( WITH_DDS_Monitor RTIDDS_MON_FOUND ) build_with_var( WITH_RTI_DistLogger RTIDDS_DLOGGER_FOUND ) +if (catkin_FOUND) + ################################### + ## catkin specific configuration ## + ################################### + catkin_package( + INCLUDE_DIRS src + LIBRARIES knDds knDdsUtil + CATKIN_DEPENDS kn Miro + DEPENDS RTIDDS + ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() +endif(catkin_FOUND) + ## We must add the in-source and out-of-source ## include paths ##-------------------------------------------- diff --git a/knDds/package.xml b/knDds/package.xml index e0e11e1..fc041c8 100644 --- a/knDds/package.xml +++ b/knDds/package.xml @@ -1,5 +1,5 @@ - + knDds 1.0.0 DDS helpers of soraCore @@ -8,7 +8,10 @@ Apache2 catkin + irg_cmake - kn - Miro + + kn + Miro + diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 4d6413b..c224ee1 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -4,7 +4,7 @@ project(knRapid) ################################### ## catkin ## ################################### -if (${CATKIN_TOPLEVEL}) +if (CATKIN_DEVEL_PREFIX) find_package(catkin REQUIRED COMPONENTS irg_cmake irgUtil @@ -12,22 +12,10 @@ if (${CATKIN_TOPLEVEL}) kn knDds ) -endif(${CATKIN_TOPLEVEL}) - -if (catkin_FOUND) - ################################### - ## catkin specific configuration ## - ################################### - catkin_package( - INCLUDE_DIRS src # NOTE: see knRapid-extras.cmake for additional include dirs - LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding - CFG_EXTRAS knRapid-extras.cmake - ) - ## set variable with full path of extras file so we can append library info - set_cfg_extras_file() - -else (catkin_FOUND) +endif(CATKIN_DEVEL_PREFIX) +if (NOT catkin_FOUND) + ## standard CMake setup set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules ${CMAKE_MODULE_PATH} ) if( CMAKE_COMPILER_IS_GNUCXX ) @@ -63,7 +51,7 @@ else (catkin_FOUND) find_package( Miro ) find_package( kn ) find_package( knDds ) -endif (catkin_FOUND) +endif (NOT catkin_FOUND) #--------------------------------------------- # make RTI DDS optional @@ -82,6 +70,22 @@ find_package( Doxygen ) build_with_var( WITH_DDS RTIDDS_FOUND ) +if (catkin_FOUND) + ################################### + ## catkin specific configuration ## + ################################### + + catkin_package( + INCLUDE_DIRS src # NOTE: see knRapid-extras.cmake for additional include dirs + LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding + CFG_EXTRAS knRapid-extras.cmake + CATKIN_DEPENDS knDds + ) + ## set variable with full path of extras file so we can append library info + set_cfg_extras_file() +endif(catkin_FOUND) + + ## We must add the in-source and out-of-source ## include paths ## Boost include path is also required everywhere diff --git a/knRapid/package.xml b/knRapid/package.xml index 8ad13c4..9a1cfca 100644 --- a/knRapid/package.xml +++ b/knRapid/package.xml @@ -1,5 +1,5 @@ - + knRapid 1.0.0 Rapid Implementation of soraCore @@ -9,8 +9,9 @@ catkin irg_cmake - irgUtil - kn - knDds - Miro + + irgUtil + kn + knDds + Miro From 175348c3db6cbbd8cb1e265ee69fd30264363a5b Mon Sep 17 00:00:00 2001 From: mallan Date: Wed, 23 Sep 2015 22:59:41 +0000 Subject: [PATCH 13/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10589 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/ExtArcConstants.idl | 2 + .../NrcDriveGoalWithLanesSample.idl | 65 +++++++++++++++ .../rapidExtArcDds/NrcMapLaneSetSample.idl | 83 +++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl create mode 100644 knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 7260555..b4f7bc9 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -44,6 +44,8 @@ module rapid { const String64 TRACKEDOBJECT_CONFIG_TOPIC = "rapid_trackedobject_config"; const String64 TRACKEDOBJECT_SAMPLE_TOPIC = "rapid_trackedobject_sample"; const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; + + const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_drivegoalwithlanes_sample"; }; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl new file mode 100644 index 0000000..2bc1b86 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" +#include "BaseTypes.idl" +#include "NrcMapLaneSetSample.idl" + +module rapid { + module ext { + module arc { + + const octet NRC_STOP = 0; + const octet NRC_NO_STOP = 1; + + const octet NRC_ON_THIS_ROAD = 0; // Remain on this road but drive in any lane. + const octet NRC_STRICT_IN_THIS_LANE = 1; // Remain in the specified line and allow only small deviation into other lanes. For example, to pass a parked car + const octet NRC_RELAXED_IN_THIS_LANE = 2; // May move into other lanes briefly but return to this lane as soon a practical + const octet NRC_COME_TO_THIS_POINT = 3; + + //@copy-declaration /** + //@copy-declaration * Direct copy of NRC ROS type. + //@copy-declaration * Provides the next position in-lane position that the vehicle will drive to. + //@copy-declaration */ + struct DriveGoal { + long lane_id; + + //@copy /** Note: known as variable s with the mission planner. */ + float longitudinal_position; + + Transform3D pose; + + //@copy /** The desired speed of the vehicle in the segment between the end of the prevoius drive goal and arriving at this goal */ + float approach_speed; + + //@copy /** Speed limit on road */ + float speed_limit; + + //@copy /** Departure Constraints */ + octet departure_constraints; + + //@copy /** Controls the freedom of the behavior recipient to change lanes etc. */ + octet drive_mode; + }; + + typedef sequence DriveGoalSequence; + + //@copy-c-declaration class NrcDriveGoalWithLanesSampleTypeSupport; + //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataWriter; + //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataReader; + //@copy-c-declaration struct NrcDriveGoalWithLanesSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcDriveGoalWithLanesSample + //@copy-declaration */ + valuetype NrcDriveGoalWithLanesSample : Message { + public DriveGoalSequence drive_goals; + public MapLaneSequence map_lanes; + }; + + }; + }; +}; \ No newline at end of file diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl new file mode 100644 index 0000000..258f0cb --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" +#include "BaseTypes.idl" + +module rapid { + module ext { + module arc { + + //@copy-declaration /** Direct copy of NRC ROS type */ + struct MapPoint { + float x; + float y; + float z; + float theta; + + // height at the end of vector + float z_end; + float length; + + // position at MapLine. Start is 0 + float s; + + // curvatures. If it's line, all curv_* is 0 + float curv_start; + float curv_mid; + float curv_end; + }; + + typedef sequence MapPointSequence512; + typedef sequence Vec2dSequence128; + + //@copy-declaration /** Direct copy of NRC ROS type */ + struct MapLine { + MapPointSequence512 map_points; + String32 type; + String32 road_mark_type; + }; + + //@copy-declaration /** Direct copy of NRC ROS type */ + struct MapLane { + long id; + MapLine lane_center; + MapLine left_boundary; + MapLine right_boundrary; + MapLine left_outer_boundary; + MapLine right_outer_boundary; + + long left_sibling_id; + long right_sibling_id; + + // "s" : distance along path from 1st point. + DoubleSequence128 stop_line_positions; + + // "s", max speed [m/s] + Vec2dSequence128 speed_along_path; + + // "s" value to start transition to next lane + // -1 means no transition + double transit_s; + }; + + typedef sequence MapLaneSequence; + + //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; + //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; + //@copy-c-declaration class NrcMapLaneSetSampleDataReader; + //@copy-c-declaration struct NrcMapLaneSetSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcMapLaneSetSample + //@copy-declaration */ + valuetype NrcMapLaneSetSample : Message { + public MapLaneSequence map_lanes; + }; + + }; + }; +}; \ No newline at end of file From ed17a53e0cf469b22ea425ef9518e3b235a623be Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 24 Sep 2015 23:47:57 +0000 Subject: [PATCH 14/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10591 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcDds/NrcMapLaneSetSample.idl | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl index 258f0cb..f5b850b 100644 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -30,42 +30,42 @@ module rapid { float curv_mid; float curv_end; }; - + typedef sequence MapPointSequence512; - typedef sequence Vec2dSequence128; - + typedef sequence Vec2dSequence64; + //@copy-declaration /** Direct copy of NRC ROS type */ struct MapLine { MapPointSequence512 map_points; String32 type; String32 road_mark_type; }; - + //@copy-declaration /** Direct copy of NRC ROS type */ struct MapLane { long id; MapLine lane_center; MapLine left_boundary; - MapLine right_boundrary; + MapLine right_boundary; MapLine left_outer_boundary; MapLine right_outer_boundary; - + long left_sibling_id; long right_sibling_id; // "s" : distance along path from 1st point. - DoubleSequence128 stop_line_positions; + DoubleSequence64 stop_line_positions; // "s", max speed [m/s] - Vec2dSequence128 speed_along_path; + Vec2dSequence64 speed_along_path; // "s" value to start transition to next lane // -1 means no transition double transit_s; }; - - typedef sequence MapLaneSequence; - + + typedef sequence MapLaneSequence; + //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; //@copy-c-declaration class NrcMapLaneSetSampleDataReader; @@ -77,7 +77,8 @@ module rapid { valuetype NrcMapLaneSetSample : Message { public MapLaneSequence map_lanes; }; - + }; }; -}; \ No newline at end of file +}; + From 586891e74d5f6b4262fb4ffd53ca4dcf206bc6c3 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 25 Sep 2015 21:27:06 +0000 Subject: [PATCH 15/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10593 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcDds/NrcDriveGoalWithLanesSample.idl | 7 +++++++ knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl index 2bc1b86..9d0bff1 100644 --- a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl @@ -56,6 +56,13 @@ module rapid { //@copy-declaration * NrcDriveGoalWithLanesSample //@copy-declaration */ valuetype NrcDriveGoalWithLanesSample : Message { + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleDataReader DataReader; + //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcDriveGoalWithLanesSample Type; public DriveGoalSequence drive_goals; public MapLaneSequence map_lanes; }; diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl index f5b850b..a6dfe31 100644 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -64,7 +64,7 @@ module rapid { double transit_s; }; - typedef sequence MapLaneSequence; + typedef sequence MapLaneSequence; //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; @@ -75,6 +75,15 @@ module rapid { //@copy-declaration * NrcMapLaneSetSample //@copy-declaration */ valuetype NrcMapLaneSetSample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcMapLaneSetSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcMapLaneSetSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcMapLaneSetSampleDataReader DataReader; + //@copy-c-declaration typedef NrcMapLaneSetSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcMapLaneSetSample Type; + public MapLaneSequence map_lanes; }; From c5cffcd86eceed6452f40f283ca91a7c589adc5f Mon Sep 17 00:00:00 2001 From: mallan Date: Sat, 10 Oct 2015 02:28:36 +0000 Subject: [PATCH 16/90] fix configure.sh that never actually allowed specifying a custom Miro path git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10594 71bd3d61-4118-0410-985d-8aea7a627388 --- configure.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index a1de890..fc6767a 100755 --- a/configure.sh +++ b/configure.sh @@ -92,7 +92,7 @@ target="install" usage_string="$0 [-h] [-p install_path] [-b buildname] [-a acetao_path] [-m miro_path][-c ] [-t make_target]" -optstring="hp:b:a:t:cC" +optstring="hp:b:a:m:t:cC" # Print the help message (list all the options) print_help() @@ -305,6 +305,14 @@ else fi +if [ -z ${miro_dir} ] ; then + miro_flag="" +else + miro_canonical=`canonicalize ${miro_dir}` + miro_flag="-DMIRO_ROOT_DIR:PATH=${miro_canonical}" +fi + + echo "=== ${0} flags:" echo " prefix: $install_path" echo " build: $build_path" From 08313b493ebea4b5294981c2c75e277bc957b842 Mon Sep 17 00:00:00 2001 From: mallan Date: Sat, 10 Oct 2015 02:32:33 +0000 Subject: [PATCH 17/90] fix configure.sh that never actually allowed specifying a custom Miro path... again. Looks like this configure script never even tried to support a custom Miro path git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10595 71bd3d61-4118-0410-985d-8aea7a627388 --- configure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.sh b/configure.sh index fc6767a..0bd8965 100755 --- a/configure.sh +++ b/configure.sh @@ -351,11 +351,11 @@ build_module "irgUtil" "${BUILD_TYPE} " build_module "kn" "${BUILD_TYPE} \ ${acetao_flag}" -build_module "knDds" "${BUILD_TYPE} -DMIRO_ROOT_DIR:PATH=${install_path}\ +build_module "knDds" "${BUILD_TYPE} ${miro_flag} \ ${acetao_flag}" build_module "knRapid" "${BUILD_TYPE} \ - -DMIRO_ROOT_DIR:PATH=${install_path}\ + ${miro_flag} \ ${acetao_flag}" echo From 2f65389f840d15c55c64d348e89cae9b5b11e1a5 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 16 Oct 2015 22:02:37 +0000 Subject: [PATCH 18/90] merge RTI DDS 5.2 compatibility changes from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10597 71bd3d61-4118-0410-985d-8aea7a627388 --- cmake/Modules/FindRtiDds.cmake | 22 ++++-- cmake/Modules/GenerateRtiDdsIdl.cmake | 76 ++++++++++++++++--- knRapid/src/rapidDds/AccessControlState.idl | 5 ++ knRapid/src/rapidDds/Ack.idl | 5 ++ knRapid/src/rapidDds/AgentConfig.idl | 5 ++ knRapid/src/rapidDds/AgentState.idl | 5 ++ knRapid/src/rapidDds/AthleteDefs.idl | 5 ++ knRapid/src/rapidDds/BaseTypes.idl | 9 ++- knRapid/src/rapidDds/Command.idl | 5 ++ knRapid/src/rapidDds/CommandConfig.idl | 5 ++ knRapid/src/rapidDds/CommandConstants.idl | 5 ++ knRapid/src/rapidDds/FileAnnounce.idl | 5 ++ knRapid/src/rapidDds/FileQueueConfig.idl | 5 ++ knRapid/src/rapidDds/FileQueueEntryState.idl | 5 ++ .../src/rapidDds/FileQueueReceiverSample.idl | 5 ++ knRapid/src/rapidDds/FileQueueSample.idl | 5 ++ knRapid/src/rapidDds/FileQueueState.idl | 5 ++ knRapid/src/rapidDds/FrameStoreConfig.idl | 5 ++ knRapid/src/rapidDds/Header.idl | 5 ++ knRapid/src/rapidDds/ImageMetadata.idl | 5 ++ knRapid/src/rapidDds/ImageSensorSample.idl | 5 ++ knRapid/src/rapidDds/ImageSensorState.idl | 5 ++ knRapid/src/rapidDds/JointConfig.idl | 5 ++ knRapid/src/rapidDds/JointSample.idl | 5 ++ knRapid/src/rapidDds/K10Defs.idl | 5 ++ knRapid/src/rapidDds/MIMETypesConstants.idl | 5 ++ knRapid/src/rapidDds/MacroConfig.idl | 5 ++ knRapid/src/rapidDds/MacroState.idl | 5 ++ knRapid/src/rapidDds/Message.idl | 5 ++ knRapid/src/rapidDds/PointCloudConfig.idl | 5 ++ knRapid/src/rapidDds/PointCloudSample.idl | 5 ++ knRapid/src/rapidDds/PositionConfig.idl | 5 ++ knRapid/src/rapidDds/PositionSample.idl | 5 ++ knRapid/src/rapidDds/QueueState.idl | 5 ++ knRapid/src/rapidDds/RapidConstants.idl | 5 ++ knRapid/src/rapidDds/TextMessage.idl | 5 ++ .../src/rapidExtArcDds/BatteryPackConfig.idl | 3 +- .../src/rapidExtArcDds/BatteryPackSample.idl | 7 +- knRapid/src/rapidExtArcDds/DlpConfig.idl | 5 ++ knRapid/src/rapidExtArcDds/DlpSample.idl | 5 ++ .../src/rapidExtArcDds/EphemerisConfig.idl | 5 ++ .../src/rapidExtArcDds/EphemerisSample.idl | 5 ++ .../rapidExtArcDds/ExtArcCommandConstants.idl | 5 ++ .../src/rapidExtArcDds/ExtArcConstants.idl | 5 ++ knRapid/src/rapidExtArcDds/Float32Config.idl | 5 ++ knRapid/src/rapidExtArcDds/Float32Sample.idl | 5 ++ knRapid/src/rapidExtArcDds/GenericConfig.idl | 5 ++ .../GeometryAppearanceState.idl | 5 ++ knRapid/src/rapidExtArcDds/GeometryConfig.idl | 5 ++ .../src/rapidExtArcDds/GeometryMeshSample.idl | 5 ++ knRapid/src/rapidExtArcDds/HydraConfig.idl | 5 ++ knRapid/src/rapidExtArcDds/HydraSample.idl | 5 ++ knRapid/src/rapidExtArcDds/MobilitySample.idl | 7 +- .../NrcDriveGoalWithLanesSample.idl | 6 +- .../rapidExtArcDds/NrcMapLaneSetSample.idl | 5 ++ knRapid/src/rapidExtArcDds/SpectrumConfig.idl | 5 ++ knRapid/src/rapidExtArcDds/SpectrumSample.idl | 5 ++ .../src/rapidExtArcDds/StateMachineConfig.idl | 5 ++ .../src/rapidExtArcDds/StateMachineState.idl | 5 ++ .../rapidExtArcDds/TrackedObjectConfig.idl | 5 ++ .../rapidExtArcDds/TrackedObjectSample.idl | 5 ++ .../src/rapidExtArcDds/WheelGroupSample.idl | 5 ++ .../src/rapidExtDds/ExtCommandConstants.idl | 5 ++ knRapid/src/rapidExtDds/ExtConstants.idl | 5 ++ knRapid/src/rapidExtDds/NavMapConfig.idl | 5 ++ knRapid/src/rapidExtDds/NavMapSample.idl | 5 ++ .../src/rapidExtDds/ProcessManagerConfig.idl | 1 + knRapid/src/rapidExtDds/RangeScanConfig.idl | 5 ++ knRapid/src/rapidExtDds/RangeScanSample.idl | 5 ++ knRapid/src/rapidExtDds/SystemInfoSample.idl | 2 +- .../src/rapidExtDds/Trajectory2DConfig.idl | 5 ++ .../src/rapidExtDds/Trajectory2DSample.idl | 5 ++ knRapid/src/rapidExtDds/TrajectoryConfig.idl | 5 ++ knRapid/src/rapidExtDds/TrajectorySample.idl | 5 ++ knRapid/src/rapidExtDds/VEStopConfig.idl | 5 ++ knRapid/src/rapidExtDds/VEStopState.idl | 5 ++ 76 files changed, 440 insertions(+), 28 deletions(-) diff --git a/cmake/Modules/FindRtiDds.cmake b/cmake/Modules/FindRtiDds.cmake index 53e4639..42f1846 100644 --- a/cmake/Modules/FindRtiDds.cmake +++ b/cmake/Modules/FindRtiDds.cmake @@ -86,22 +86,27 @@ if( NOT BIGENDIAN ) set( RTIDDS_DEFINES ${RTIDDS_DEFINES} RTI_ENDIAN_LITTLE ) endif( NOT BIGENDIAN ) -# set the scripts search path +# set the scripts/bin search path #-------------------------------------------------- set( SCRIPTS_SEARCH_PATH "" ) if( RTIDDS_ROOT_DIR ) - set( SCRIPTS_SEARCH_PATH ${RTIDDS_ROOT_DIR}/scripts ) + set( SCRIPTS_SEARCH_PATH ${RTIDDS_ROOT_DIR}/bin + ${RTIDDS_ROOT_DIR}/scripts + ) else( RTIDDS_ROOT_DIR ) set( PKG_DIR_NAME ndds ) # default search path set( SCRIPTS_SEARCH_PATH ${SCRIPTS_SEARCH_PATH} + ${IRG_PACKAGES_DIR}/${PKG_DIR_NAME}/bin ${IRG_PACKAGES_DIR}/${PKG_DIR_NAME}/scripts + /usr/local/${PKG_DIR_NAME}/bin /usr/local/${PKG_DIR_NAME}/scripts /usr/local/bin /usr/bin + c:/devel/${PKG_DIR_NAME}/bin c:/devel/${PKG_DIR_NAME}/scripts ) @@ -112,7 +117,9 @@ else( RTIDDS_ROOT_DIR ) set( ENV_VAR_VALUE $ENV{${ENV_VAR_NAME}} ) if( ENV_VAR_VALUE ) message( STATUS " ${ENV_VAR_NAME} environment variable is set to ${ENV_VAR_VALUE}" ) - set( SCRIPTS_SEARCH_PATH ${ENV_VAR_VALUE}/scripts ) + set( SCRIPTS_SEARCH_PATH ${ENV_VAR_VALUE}/bin + ${ENV_VAR_VALUE}/scripts + ) endif( ENV_VAR_VALUE ) endforeach( ENV_VAR_NAME ${ENV_VAR_NAMES} ) @@ -136,14 +143,15 @@ if( RTIDDS_IDL_COMMAND ) get_filename_component(RTIDDS_ROOT_DIR ${_RTIDDS_ROOT_DIR} REALPATH) set( NDDSHOME ${RTIDDS_ROOT_DIR} ) + set( ENV_NDDSARCH $ENV{NDDSARCH} ) # guess the rti architecture string # this is absolutely horrible... even in their own # scripts they have a fragile way to guess their # architecture string. So, we do our best... #-------------------------------------------------- - if( $ENV{NDDSARCH} ) - message( STATUS " NDDSARCH environment variable is set to $ENV{NDDSARCH}" ) - set(RTIDDS_ARCHITECTURE $ENV{NDDSARCH}) + if( ENV_NDDSARCH ) + message( STATUS " NDDSARCH environment variable is set to \"${ENV_NDDSARCH}\"" ) + set(RTIDDS_ARCHITECTURE ${ENV_NDDSARCH}) else( $ENV{NDDSARCH} ) message( STATUS " NDDSARCH environment variable is NOT set. Will try to guess architecture string..." ) set(RTIDDS_ARCHITECTURE "INVALID" ) # default value @@ -193,7 +201,7 @@ if( RTIDDS_IDL_COMMAND ) message(STATUS "") endif( NOT RTILIB_SUBDIR ) string(REGEX MATCH "[^/]*$" RTIDDS_ARCHITECTURE ${RTILIB_SUBDIR}) - endif( $ENV{NDDSARCH} ) + endif( ENV_NDDSARCH ) message( STATUS " Using \"${RTIDDS_ARCHITECTURE}\" for RTI architecture string" ) diff --git a/cmake/Modules/GenerateRtiDdsIdl.cmake b/cmake/Modules/GenerateRtiDdsIdl.cmake index 3edd6e9..6c0e3c8 100644 --- a/cmake/Modules/GenerateRtiDdsIdl.cmake +++ b/cmake/Modules/GenerateRtiDdsIdl.cmake @@ -57,7 +57,8 @@ macro( rtidds_wrap_idl ) set( EXT_XML ".xml" ) set( RTIDDS_EXPORT "NDDS_USER_DLL_EXPORT" ) - set( RTIDDS_IDL_FLAGS -language C++ -replace -namespace -convertToXml) + set( RTIDDS_IDL_FLAGS -language C++ -replace -namespace ) + set( RTIDDS_XML_FLAGS -replace -namespace -convertToXml) if( WIN32 ) if( EXPORT_SUFFIX ) set( RTIDDS_EXPORT "NDDS_USER_DLL_EXPORT_${EXPORT_SUFFIX}" ) @@ -72,7 +73,20 @@ macro( rtidds_wrap_idl ) set( RTIDDS_IDL_GENERATED "" ) set( RTIDDS_IDL_GENERATED_HEADERS "" ) set( RTIDDS_IDL_GENERATED_XMLS "" ) - + + get_filename_component(IDL_COMMAND_PATH ${RTIDDS_IDL_COMMAND} DIRECTORY) + find_file(RTIDDS_IDL_SERVER + NAMES rtiddsgen_server + HINTS ${IDL_COMMAND_PATH} + DOC "Path to RTI DDS IDL compiler (server mode)" + ) + set(_RTIDDS_IDL_COMMAND ${RTIDDS_IDL_COMMAND}) + if(RTIDDS_IDL_SERVER) + message(STATUS "Found ${RTIDDS_IDL_SERVER}: will use that instead, to speed up build") + set(_RTIDDS_IDL_COMMAND ${RTIDDS_IDL_SERVER}) + endif(RTIDDS_IDL_SERVER) + + # add a custom command set for idl files #----------------------------------------------------- foreach( IDL_FILENAME ${ARGN} ) @@ -134,22 +148,39 @@ macro( rtidds_wrap_idl ) endif (DEBUG_IDL_DEPENDENCIES) - #message( STATUS "COMMAND = ${EXTRA_ENVIRONMENT} ${RTIDDS_IDL_COMMAND}" ) + #message( STATUS "COMMAND = ${EXTRA_ENVIRONMENT} ${_RTIDDS_IDL_COMMAND}" ) #message( STATUS " ARGS = ${RTIDDS_IDL_FLAGS} ${EXTRA_RTIDDS_IDL_ARGS}" ) #message( STATUS " -I${SRCDIR} ${RTIDDS_IDL_INCLUDES} " ) #message( STATUS " -d ${OOSDIR} ${SRCDIR}/${IDL_BASE}.idl" ) # setup the command + # RTI DDS 5.2 IDL compiler will no longer generate c++ and xml + # with the same invocation of rtiddsgen, so we have to run it twice. #----------------------------------------------------- - add_custom_command( - OUTPUT ${IDL_OUTPUT_FILES} - DEPENDS ${DEPEND_FILE_LIST} - COMMAND ${EXTRA_ENVIRONMENT} ${RTIDDS_IDL_COMMAND} - ARGS ${RTIDDS_IDL_FLAGS} ${EXTRA_RTIDDS_IDL_ARGS} - -I${SRCDIR} ${RTIDDS_IDL_INCLUDES} - -d ${OOSDIR} ${SRCDIR}/${IDL_BASE}.idl - ) - + if(RTIDDS_VERSION VERSION_LESS 5.2.0) + add_custom_command( + OUTPUT ${IDL_OUTPUT_FILES} + DEPENDS ${DEPEND_FILE_LIST} + COMMAND ${EXTRA_ENVIRONMENT} ${_RTIDDS_IDL_COMMAND} + ARGS ${RTIDDS_IDL_FLAGS} ${EXTRA_RTIDDS_IDL_ARGS} -convertToXml + -I${SRCDIR} ${RTIDDS_IDL_INCLUDES} + -d ${OOSDIR} ${SRCDIR}/${IDL_BASE}.idl + ) + else(RTIDDS_VERSION VERSION_LESS 5.2.0) + add_custom_command( + OUTPUT ${IDL_OUTPUT_FILES} + DEPENDS ${DEPEND_FILE_LIST} + COMMAND ${EXTRA_ENVIRONMENT} ${_RTIDDS_IDL_COMMAND} + ARGS ${RTIDDS_IDL_FLAGS} ${EXTRA_RTIDDS_IDL_ARGS} + -I${SRCDIR} ${RTIDDS_IDL_INCLUDES} + -d ${OOSDIR} ${SRCDIR}/${IDL_BASE}.idl + COMMAND ${EXTRA_ENVIRONMENT} ${_RTIDDS_IDL_COMMAND} + ARGS ${RTIDDS_XML_FLAGS} ${EXTRA_RTIDDS_IDL_ARGS} + -I${SRCDIR} ${RTIDDS_IDL_INCLUDES} + -d ${OOSDIR} ${SRCDIR}/${IDL_BASE}.idl + ) + endif(RTIDDS_VERSION VERSION_LESS 5.2.0) + set( RTIDDS_IDL_GENERATED_HEADERS ${IDL_OUTPUT_HEADERS} ${RTIDDS_IDL_GENERATED_HEADERS} @@ -165,6 +196,27 @@ macro( rtidds_wrap_idl ) ${RTIDDS_IDL_GENERATED_XMLS} ) + ## copy header to devel/include if we are using catkin + ## and header is under ${PROJECT}/src/... + ##--------------------------------------------------- + string( REGEX MATCH "${CMAKE_SOURCE_DIR}/.*/src/.*" IS_SRC_MODULE ${CMAKE_CURRENT_SOURCE_DIR} ) + if(catkin_FOUND AND IS_SRC_MODULE ) + # extract "module" path. Requires that directories are named ${PROJECT}/src/${MODULE} + string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/src/" "" MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) + + set( RTIDDSIDL_OUTPUT_TARGET RtiDdsIdl_${IDL_BASE} ) + add_custom_target( ${RTIDDSIDL_OUTPUT_TARGET} ALL DEPENDS ${IDL_OUTPUT_FILES} ) + + set( RTIDDSIDL_DEVEL_DEST ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${MODULE_PATH} ) + foreach( IDL_GENERATED_HEADER ${IDL_OUTPUT_HEADERS} ) + get_filename_component( IDL_HEADER_FILENAME ${IDL_GENERATED_HEADER} NAME ) + add_custom_command( + TARGET ${RTIDDSIDL_OUTPUT_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${IDL_GENERATED_HEADER} ${RTIDDSIDL_DEVEL_DEST}/${IDL_HEADER_FILENAME} + ) + endforeach() + endif( catkin_FOUND AND IS_SRC_MODULE ) endforeach( IDL_FILENAME ) endmacro( rtidds_wrap_idl ) diff --git a/knRapid/src/rapidDds/AccessControlState.idl b/knRapid/src/rapidDds/AccessControlState.idl index 89d201a..e6284cd 100644 --- a/knRapid/src/rapidDds/AccessControlState.idl +++ b/knRapid/src/rapidDds/AccessControlState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_AccessControlState_idl +#define rapid_AccessControlState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -51,3 +54,5 @@ module rapid { public String32Sequence16 requestors; }; }; + +#endif // rapid_AccessControlState_idl diff --git a/knRapid/src/rapidDds/Ack.idl b/knRapid/src/rapidDds/Ack.idl index 0935be1..69b4b3b 100644 --- a/knRapid/src/rapidDds/Ack.idl +++ b/knRapid/src/rapidDds/Ack.idl @@ -1,3 +1,6 @@ +#ifndef rapid_Ack_idl +#define rapid_Ack_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -82,3 +85,5 @@ module rapid { public String128 message; }; }; + +#endif // rapid_Ack_idl diff --git a/knRapid/src/rapidDds/AgentConfig.idl b/knRapid/src/rapidDds/AgentConfig.idl index fa5718a..01e1bac 100644 --- a/knRapid/src/rapidDds/AgentConfig.idl +++ b/knRapid/src/rapidDds/AgentConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_AgentConfig_idl +#define rapid_AgentConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -77,3 +80,5 @@ module rapid { }; }; + +#endif // rapid_AgentConfig_idl diff --git a/knRapid/src/rapidDds/AgentState.idl b/knRapid/src/rapidDds/AgentState.idl index 571f911..d54f832 100644 --- a/knRapid/src/rapidDds/AgentState.idl +++ b/knRapid/src/rapidDds/AgentState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_AgentState_idl +#define rapid_AgentState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -47,3 +50,5 @@ module rapid { }; + +#endif // rapid_AgentState_idl diff --git a/knRapid/src/rapidDds/AthleteDefs.idl b/knRapid/src/rapidDds/AthleteDefs.idl index 3f448c4..83691e9 100644 --- a/knRapid/src/rapidDds/AthleteDefs.idl +++ b/knRapid/src/rapidDds/AthleteDefs.idl @@ -1,3 +1,6 @@ +#ifndef rapid_AthleteDefs_idl +#define rapid_AthleteDefs_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -88,3 +91,5 @@ module rapid { const String16 INT_TYPE_KEY = "__INT__"; }; + +#endif // rapid_AthleteDefs_idl diff --git a/knRapid/src/rapidDds/BaseTypes.idl b/knRapid/src/rapidDds/BaseTypes.idl index b2596e3..9f0ff29 100644 --- a/knRapid/src/rapidDds/BaseTypes.idl +++ b/knRapid/src/rapidDds/BaseTypes.idl @@ -1,3 +1,6 @@ +#ifndef rapid_BaseTypes_idl +#define rapid_BaseTypes_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -156,9 +159,9 @@ module rapid { case RAPID_STRING: String128 s; case RAPID_VEC3d: - Vec3d vec3d; //@copy /**< vector */ + Vec3d vec3d; case RAPID_MAT33f: - Mat33f mat33f; //@copy /**< rotation matrix */ + Mat33f mat33f; }; typedef sequence ParameterSequence16; typedef sequence ParameterSequence64; @@ -250,3 +253,5 @@ module rapid { typedef sequence NamedOptionSetValueSequence16; typedef sequence NamedOptionSetValueSequence32; }; + +#endif // rapid_BaseTypes_idl diff --git a/knRapid/src/rapidDds/Command.idl b/knRapid/src/rapidDds/Command.idl index 7d5e26f..f7d92de 100644 --- a/knRapid/src/rapidDds/Command.idl +++ b/knRapid/src/rapidDds/Command.idl @@ -1,3 +1,6 @@ +#ifndef rapid_Command_idl +#define rapid_Command_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -86,3 +89,5 @@ module rapid { public String64 targetCmdId; }; }; + +#endif // rapid_Command_idl diff --git a/knRapid/src/rapidDds/CommandConfig.idl b/knRapid/src/rapidDds/CommandConfig.idl index 16b430d..e84d056 100644 --- a/knRapid/src/rapidDds/CommandConfig.idl +++ b/knRapid/src/rapidDds/CommandConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_CommandConfig_idl +#define rapid_CommandConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -85,3 +88,5 @@ module rapid { }; }; + +#endif // rapid_CommandConfig_idl diff --git a/knRapid/src/rapidDds/CommandConstants.idl b/knRapid/src/rapidDds/CommandConstants.idl index f658762..a22a8db 100644 --- a/knRapid/src/rapidDds/CommandConstants.idl +++ b/knRapid/src/rapidDds/CommandConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_CommandConstants_idl +#define rapid_CommandConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -379,3 +382,5 @@ module rapid { const String32 RAFT_METHOD_SETBANDWIDTH = "setBandwidth"; }; + +#endif // rapid_CommandConstants_idl diff --git a/knRapid/src/rapidDds/FileAnnounce.idl b/knRapid/src/rapidDds/FileAnnounce.idl index 6a189d4..b595697 100644 --- a/knRapid/src/rapidDds/FileAnnounce.idl +++ b/knRapid/src/rapidDds/FileAnnounce.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileAnnounce_idl +#define rapid_FileAnnounce_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -47,3 +50,5 @@ module rapid { public KeyTypeValueSequence16 metaData; }; }; + +#endif // rapid_FileAnnounce_idl diff --git a/knRapid/src/rapidDds/FileQueueConfig.idl b/knRapid/src/rapidDds/FileQueueConfig.idl index 1014d69..41a4c71 100644 --- a/knRapid/src/rapidDds/FileQueueConfig.idl +++ b/knRapid/src/rapidDds/FileQueueConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileQueueConfig_idl +#define rapid_FileQueueConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -52,3 +55,5 @@ module rapid { }; }; + +#endif // rapid_FileQueueConfig_idl diff --git a/knRapid/src/rapidDds/FileQueueEntryState.idl b/knRapid/src/rapidDds/FileQueueEntryState.idl index 5e83f7e..c434588 100644 --- a/knRapid/src/rapidDds/FileQueueEntryState.idl +++ b/knRapid/src/rapidDds/FileQueueEntryState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileQueueEntryState_idl +#define rapid_FileQueueEntryState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -72,3 +75,5 @@ module rapid { public short channelId; }; }; + +#endif // rapid_FileQueueEntryState_idl diff --git a/knRapid/src/rapidDds/FileQueueReceiverSample.idl b/knRapid/src/rapidDds/FileQueueReceiverSample.idl index f2d406b..af92322 100644 --- a/knRapid/src/rapidDds/FileQueueReceiverSample.idl +++ b/knRapid/src/rapidDds/FileQueueReceiverSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileQueueReceiverSample_idl +#define rapid_FileQueueReceiverSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -53,3 +56,5 @@ module rapid { public long completedFiles; }; }; + +#endif // rapid_FileQueueReceiverSample_idl diff --git a/knRapid/src/rapidDds/FileQueueSample.idl b/knRapid/src/rapidDds/FileQueueSample.idl index 624cbc5..4718c23 100644 --- a/knRapid/src/rapidDds/FileQueueSample.idl +++ b/knRapid/src/rapidDds/FileQueueSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileQueueSample_idl +#define rapid_FileQueueSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -51,3 +54,5 @@ module rapid { }; }; + +#endif // rapid_FileQueueSample_idl diff --git a/knRapid/src/rapidDds/FileQueueState.idl b/knRapid/src/rapidDds/FileQueueState.idl index 60a5bd8..a888634 100644 --- a/knRapid/src/rapidDds/FileQueueState.idl +++ b/knRapid/src/rapidDds/FileQueueState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FileQueueState_idl +#define rapid_FileQueueState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -77,3 +80,5 @@ module rapid { public ChannelStateSequence channels; }; }; + +#endif // rapid_FileQueueState_idl diff --git a/knRapid/src/rapidDds/FrameStoreConfig.idl b/knRapid/src/rapidDds/FrameStoreConfig.idl index 2951271..f5e40b3 100644 --- a/knRapid/src/rapidDds/FrameStoreConfig.idl +++ b/knRapid/src/rapidDds/FrameStoreConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_FrameStoreConfig_idl +#define rapid_FrameStoreConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -67,3 +70,5 @@ module rapid { }; }; + +#endif // rapid_FrameStoreConfig_idl diff --git a/knRapid/src/rapidDds/Header.idl b/knRapid/src/rapidDds/Header.idl index d24f920..79c2a73 100644 --- a/knRapid/src/rapidDds/Header.idl +++ b/knRapid/src/rapidDds/Header.idl @@ -1,3 +1,6 @@ +#ifndef rapid_Header_idl +#define rapid_Header_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -46,3 +49,5 @@ module rapid { long serial; }; }; + +#endif // rapid_Header_idl diff --git a/knRapid/src/rapidDds/ImageMetadata.idl b/knRapid/src/rapidDds/ImageMetadata.idl index 9647c30..97b99a6 100644 --- a/knRapid/src/rapidDds/ImageMetadata.idl +++ b/knRapid/src/rapidDds/ImageMetadata.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ImageMetadata_idl +#define rapid_ImageMetadata_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -53,3 +56,5 @@ module rapid { }; }; + +#endif // rapid_ImageMetadata_idl diff --git a/knRapid/src/rapidDds/ImageSensorSample.idl b/knRapid/src/rapidDds/ImageSensorSample.idl index fa77911..7dfb735 100644 --- a/knRapid/src/rapidDds/ImageSensorSample.idl +++ b/knRapid/src/rapidDds/ImageSensorSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ImageSensorSample_idl +#define rapid_ImageSensorSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -48,3 +51,5 @@ module rapid { public ImageData data; }; }; + +#endif // rapid_ImageSensorSample_idl diff --git a/knRapid/src/rapidDds/ImageSensorState.idl b/knRapid/src/rapidDds/ImageSensorState.idl index c4b6c7f..983db38 100644 --- a/knRapid/src/rapidDds/ImageSensorState.idl +++ b/knRapid/src/rapidDds/ImageSensorState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ImageSensorState_idl +#define rapid_ImageSensorState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -29,3 +32,5 @@ module rapid { }; }; + +#endif // rapid_ImageSensorState_idl diff --git a/knRapid/src/rapidDds/JointConfig.idl b/knRapid/src/rapidDds/JointConfig.idl index 9e628c7..56ed94d 100644 --- a/knRapid/src/rapidDds/JointConfig.idl +++ b/knRapid/src/rapidDds/JointConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_JointConfig_idl +#define rapid_JointConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -65,3 +68,5 @@ module rapid { }; }; + +#endif // rapid_JointConfig_idl diff --git a/knRapid/src/rapidDds/JointSample.idl b/knRapid/src/rapidDds/JointSample.idl index 3d5918a..d68f4d1 100644 --- a/knRapid/src/rapidDds/JointSample.idl +++ b/knRapid/src/rapidDds/JointSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_JointSample_idl +#define rapid_JointSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -84,3 +87,5 @@ module rapid { }; }; + +#endif // rapid_JointSample_idl diff --git a/knRapid/src/rapidDds/K10Defs.idl b/knRapid/src/rapidDds/K10Defs.idl index 26ffd1f..c480866 100644 --- a/knRapid/src/rapidDds/K10Defs.idl +++ b/knRapid/src/rapidDds/K10Defs.idl @@ -1,3 +1,6 @@ +#ifndef rapid_K10Defs_idl +#define rapid_K10Defs_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -39,3 +42,5 @@ module rapid { }; }; }; + +#endif // rapid_K10Defs_idl diff --git a/knRapid/src/rapidDds/MIMETypesConstants.idl b/knRapid/src/rapidDds/MIMETypesConstants.idl index 6ad5be7..f7e9d56 100644 --- a/knRapid/src/rapidDds/MIMETypesConstants.idl +++ b/knRapid/src/rapidDds/MIMETypesConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_MIMETypesConstants_idl +#define rapid_MIMETypesConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -39,3 +42,5 @@ module rapid { const String32 MIME_IMAGE_EXR = "image/x-exr"; // OpenEXR }; + +#endif // rapid_MIMETypesConstants_idl diff --git a/knRapid/src/rapidDds/MacroConfig.idl b/knRapid/src/rapidDds/MacroConfig.idl index 19ee27b..5b17f9d 100644 --- a/knRapid/src/rapidDds/MacroConfig.idl +++ b/knRapid/src/rapidDds/MacroConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_MacroConfig_idl +#define rapid_MacroConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -68,3 +71,5 @@ module rapid { }; }; + +#endif // rapid_MacroConfig_idl diff --git a/knRapid/src/rapidDds/MacroState.idl b/knRapid/src/rapidDds/MacroState.idl index bbfa611..c88cbf4 100644 --- a/knRapid/src/rapidDds/MacroState.idl +++ b/knRapid/src/rapidDds/MacroState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_MacroState_idl +#define rapid_MacroState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -49,3 +52,5 @@ module rapid { }; }; + +#endif // rapid_MacroState_idl diff --git a/knRapid/src/rapidDds/Message.idl b/knRapid/src/rapidDds/Message.idl index 016f944..b8aefc5 100644 --- a/knRapid/src/rapidDds/Message.idl +++ b/knRapid/src/rapidDds/Message.idl @@ -1,3 +1,6 @@ +#ifndef rapid_Message_idl +#define rapid_Message_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -22,3 +25,5 @@ module rapid { public Header hdr; //@key }; }; + +#endif // rapid_Message_idl diff --git a/knRapid/src/rapidDds/PointCloudConfig.idl b/knRapid/src/rapidDds/PointCloudConfig.idl index 462a15d..5ab5518 100644 --- a/knRapid/src/rapidDds/PointCloudConfig.idl +++ b/knRapid/src/rapidDds/PointCloudConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_PointCloudConfig_idl +#define rapid_PointCloudConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -79,3 +82,5 @@ module rapid { }; }; + +#endif // rapid_PointCloudConfig_idl diff --git a/knRapid/src/rapidDds/PointCloudSample.idl b/knRapid/src/rapidDds/PointCloudSample.idl index 6c3690c..38d047e 100644 --- a/knRapid/src/rapidDds/PointCloudSample.idl +++ b/knRapid/src/rapidDds/PointCloudSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_PointCloudSample_idl +#define rapid_PointCloudSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -87,3 +90,5 @@ module rapid { }; }; + +#endif // rapid_PointCloudSample_idl diff --git a/knRapid/src/rapidDds/PositionConfig.idl b/knRapid/src/rapidDds/PositionConfig.idl index 274797e..e62a0f2 100644 --- a/knRapid/src/rapidDds/PositionConfig.idl +++ b/knRapid/src/rapidDds/PositionConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_PositionConfig_idl +#define rapid_PositionConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -53,3 +56,5 @@ module rapid { }; }; + +#endif // rapid_PositionConfig_idl diff --git a/knRapid/src/rapidDds/PositionSample.idl b/knRapid/src/rapidDds/PositionSample.idl index 780dd28..796f524 100644 --- a/knRapid/src/rapidDds/PositionSample.idl +++ b/knRapid/src/rapidDds/PositionSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_PositionSample_idl +#define rapid_PositionSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -44,3 +47,5 @@ module rapid { public ValueSequence64 values; }; }; + +#endif // rapid_PositionSample_idl diff --git a/knRapid/src/rapidDds/QueueState.idl b/knRapid/src/rapidDds/QueueState.idl index de9b424..0408b5c 100644 --- a/knRapid/src/rapidDds/QueueState.idl +++ b/knRapid/src/rapidDds/QueueState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_QueueState_idl +#define rapid_QueueState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -102,3 +105,5 @@ module rapid{ public SingleQueue sent; }; }; + +#endif // rapid_QueueState_idl diff --git a/knRapid/src/rapidDds/RapidConstants.idl b/knRapid/src/rapidDds/RapidConstants.idl index 54cd741..09ef26b 100644 --- a/knRapid/src/rapidDds/RapidConstants.idl +++ b/knRapid/src/rapidDds/RapidConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_RapidConstants_idl +#define rapid_RapidConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -50,3 +53,5 @@ module rapid { const String64 ACCESSCONTROL_STATE_TOPIC = "rapid_accesscontrol_state"; }; + +#endif // rapid_RapidConstants_idl diff --git a/knRapid/src/rapidDds/TextMessage.idl b/knRapid/src/rapidDds/TextMessage.idl index b3d98f6..4147547 100644 --- a/knRapid/src/rapidDds/TextMessage.idl +++ b/knRapid/src/rapidDds/TextMessage.idl @@ -1,3 +1,6 @@ +#ifndef rapid_TextMessage_idl +#define rapid_TextMessage_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -59,3 +62,5 @@ module rapid { public String2K message; }; }; + +#endif // rapid_TextMessage_idl diff --git a/knRapid/src/rapidExtArcDds/BatteryPackConfig.idl b/knRapid/src/rapidExtArcDds/BatteryPackConfig.idl index 7d4f688..45e12b3 100644 --- a/knRapid/src/rapidExtArcDds/BatteryPackConfig.idl +++ b/knRapid/src/rapidExtArcDds/BatteryPackConfig.idl @@ -31,4 +31,5 @@ module rapid }; }; }; -#endif + +#endif // rapid_ext_arc_BatteryPackConfig_idl diff --git a/knRapid/src/rapidExtArcDds/BatteryPackSample.idl b/knRapid/src/rapidExtArcDds/BatteryPackSample.idl index 55c5761..86845da 100644 --- a/knRapid/src/rapidExtArcDds/BatteryPackSample.idl +++ b/knRapid/src/rapidExtArcDds/BatteryPackSample.idl @@ -1,5 +1,5 @@ -#ifndef rapid_BatteryPackSample_idl -#define rapid_BatteryPackSample_idl +#ifndef rapid_ext_arc_BatteryPackSample_idl +#define rapid_ext_arc_BatteryPackSample_idl #include "BaseTypes.idl" #include "Message.idl" @@ -124,4 +124,5 @@ module rapid }; }; }; -#endif + +#endif // rapid_ext_arc_BatteryPackSample_idl diff --git a/knRapid/src/rapidExtArcDds/DlpConfig.idl b/knRapid/src/rapidExtArcDds/DlpConfig.idl index 92d2587..5cf61f5 100644 --- a/knRapid/src/rapidExtArcDds/DlpConfig.idl +++ b/knRapid/src/rapidExtArcDds/DlpConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_DlpConfig_idl +#define rapid_ext_arc_DlpConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -65,3 +68,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_DlpConfig_idl diff --git a/knRapid/src/rapidExtArcDds/DlpSample.idl b/knRapid/src/rapidExtArcDds/DlpSample.idl index 85c1a13..9a5ee3e 100644 --- a/knRapid/src/rapidExtArcDds/DlpSample.idl +++ b/knRapid/src/rapidExtArcDds/DlpSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_DlpSample_idl +#define rapid_ext_arc_DlpSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -59,3 +62,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_DlpSample_idl diff --git a/knRapid/src/rapidExtArcDds/EphemerisConfig.idl b/knRapid/src/rapidExtArcDds/EphemerisConfig.idl index 0009c50..e5181c0 100644 --- a/knRapid/src/rapidExtArcDds/EphemerisConfig.idl +++ b/knRapid/src/rapidExtArcDds/EphemerisConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_EphemerisConfig_idl +#define rapid_ext_arc_EphemerisConfig_idl + // -*- idl -*- /* * Copyright (c) 2009 United States Government as represented by the @@ -48,3 +51,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_EphemerisConfig_idl diff --git a/knRapid/src/rapidExtArcDds/EphemerisSample.idl b/knRapid/src/rapidExtArcDds/EphemerisSample.idl index 892fb2e..a7c5076 100644 --- a/knRapid/src/rapidExtArcDds/EphemerisSample.idl +++ b/knRapid/src/rapidExtArcDds/EphemerisSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_EphemerisSample_idl +#define rapid_ext_arc_EphemerisSample_idl + // -*- idl -*- /* * Copyright (c) 2009 United States Government as represented by the @@ -40,3 +43,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_EphemerisSample_idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl index 657209f..85b7fff 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_ExtArcCommandConstants_idl +#define rapid_ext_arc_ExtArcCommandConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -125,3 +128,5 @@ module rapid { }; }; + +#endif // rapid_ext_arc_ExtArcCommandConstants_idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index b4f7bc9..067d9f3 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_ExtArcConstants_idl +#define rapid_ext_arc_ExtArcConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -49,3 +52,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_ExtArcConstants_idl diff --git a/knRapid/src/rapidExtArcDds/Float32Config.idl b/knRapid/src/rapidExtArcDds/Float32Config.idl index 83e9d68..bd3d53d 100644 --- a/knRapid/src/rapidExtArcDds/Float32Config.idl +++ b/knRapid/src/rapidExtArcDds/Float32Config.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_Float32Config_idl +#define rapid_ext_arc_Float32Config_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -42,3 +45,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_Float32Config_idl diff --git a/knRapid/src/rapidExtArcDds/Float32Sample.idl b/knRapid/src/rapidExtArcDds/Float32Sample.idl index 11d515f..abfdcfa 100644 --- a/knRapid/src/rapidExtArcDds/Float32Sample.idl +++ b/knRapid/src/rapidExtArcDds/Float32Sample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_Float32Sample_idl +#define rapid_ext_arc_Float32Sample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -43,3 +46,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_Float32Sample_idl diff --git a/knRapid/src/rapidExtArcDds/GenericConfig.idl b/knRapid/src/rapidExtArcDds/GenericConfig.idl index 17ee9f8..f09f981 100644 --- a/knRapid/src/rapidExtArcDds/GenericConfig.idl +++ b/knRapid/src/rapidExtArcDds/GenericConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_GenericConfig_idl +#define rapid_ext_arc_GenericConfig_idl + //idl #include "Message.idl" @@ -30,3 +33,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_GenericConfig_idl diff --git a/knRapid/src/rapidExtArcDds/GeometryAppearanceState.idl b/knRapid/src/rapidExtArcDds/GeometryAppearanceState.idl index d412d78..d1a836a 100644 --- a/knRapid/src/rapidExtArcDds/GeometryAppearanceState.idl +++ b/knRapid/src/rapidExtArcDds/GeometryAppearanceState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_GeometryAppearanceState_idl +#define rapid_ext_arc_GeometryAppearanceState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -50,3 +53,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_GeometryAppearanceState_idl diff --git a/knRapid/src/rapidExtArcDds/GeometryConfig.idl b/knRapid/src/rapidExtArcDds/GeometryConfig.idl index 9cc6da9..f1b09bd 100644 --- a/knRapid/src/rapidExtArcDds/GeometryConfig.idl +++ b/knRapid/src/rapidExtArcDds/GeometryConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_GeometryConfig_idl +#define rapid_ext_arc_GeometryConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -46,3 +49,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_GeometryConfig_idl diff --git a/knRapid/src/rapidExtArcDds/GeometryMeshSample.idl b/knRapid/src/rapidExtArcDds/GeometryMeshSample.idl index 80ce4e5..675fbf8 100644 --- a/knRapid/src/rapidExtArcDds/GeometryMeshSample.idl +++ b/knRapid/src/rapidExtArcDds/GeometryMeshSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_GeometryMeshSample_idl +#define rapid_ext_arc_GeometryMeshSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -81,3 +84,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_GeometryMeshSample_idl diff --git a/knRapid/src/rapidExtArcDds/HydraConfig.idl b/knRapid/src/rapidExtArcDds/HydraConfig.idl index a9fcc82..2684eb8 100644 --- a/knRapid/src/rapidExtArcDds/HydraConfig.idl +++ b/knRapid/src/rapidExtArcDds/HydraConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_HydraConfig_idl +#define rapid_ext_arc_HydraConfig_idl + #include "Message.idl" module rapid @@ -29,3 +32,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_HydraConfig_idl diff --git a/knRapid/src/rapidExtArcDds/HydraSample.idl b/knRapid/src/rapidExtArcDds/HydraSample.idl index d9eeb2c..5787ce7 100644 --- a/knRapid/src/rapidExtArcDds/HydraSample.idl +++ b/knRapid/src/rapidExtArcDds/HydraSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_HydraSample_idl +#define rapid_ext_arc_HydraSample_idl + // idl #include "Message.idl" @@ -66,3 +69,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_HydraSample_idl diff --git a/knRapid/src/rapidExtArcDds/MobilitySample.idl b/knRapid/src/rapidExtArcDds/MobilitySample.idl index 76ba1f0..c041aca 100644 --- a/knRapid/src/rapidExtArcDds/MobilitySample.idl +++ b/knRapid/src/rapidExtArcDds/MobilitySample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_MobilitySample_idl +#define rapid_ext_arc_MobilitySample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -43,7 +46,7 @@ module rapid { public Vec3d xytTolerance; public float hintedSpeed; public String32 navAlgo; - //@copy-declaration /** extension values */ + //@copy-declaration /** extension values */ public KeyTypeValueSequence8 keyedValues; }; @@ -60,3 +63,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_MobilitySample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl index 9d0bff1..25ea47f 100644 --- a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_NrcDriveGoalWithLanesSample_idl +#define rapid_ext_arc_NrcDriveGoalWithLanesSample_idl + /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -69,4 +72,5 @@ module rapid { }; }; -}; \ No newline at end of file +}; +#endif // rapid_ext_arc_NrcDriveGoalWithLanesSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl index a6dfe31..66652c0 100644 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_NrcMapLaneSetSample_idl +#define rapid_ext_arc_NrcMapLaneSetSample_idl + /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -91,3 +94,5 @@ module rapid { }; }; + +#endif // rapid_ext_arc_NrcMapLaneSetSample_idl diff --git a/knRapid/src/rapidExtArcDds/SpectrumConfig.idl b/knRapid/src/rapidExtArcDds/SpectrumConfig.idl index a7996b3..a6837c8 100644 --- a/knRapid/src/rapidExtArcDds/SpectrumConfig.idl +++ b/knRapid/src/rapidExtArcDds/SpectrumConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_SpectrumConfig_idl +#define rapid_ext_arc_SpectrumConfig_idl + #include "Message.idl" module rapid @@ -42,3 +45,5 @@ module rapid }; }; + +#endif // rapid_ext_arc_SpectrumConfig_idl diff --git a/knRapid/src/rapidExtArcDds/SpectrumSample.idl b/knRapid/src/rapidExtArcDds/SpectrumSample.idl index 3bfbd0d..1527cee 100644 --- a/knRapid/src/rapidExtArcDds/SpectrumSample.idl +++ b/knRapid/src/rapidExtArcDds/SpectrumSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_SpectrumSample_idl +#define rapid_ext_arc_SpectrumSample_idl + #include "Message.idl" module rapid @@ -33,3 +36,5 @@ module rapid }; + +#endif // rapid_ext_arc_SpectrumSample_idl diff --git a/knRapid/src/rapidExtArcDds/StateMachineConfig.idl b/knRapid/src/rapidExtArcDds/StateMachineConfig.idl index 52bc211..aa9bbf9 100644 --- a/knRapid/src/rapidExtArcDds/StateMachineConfig.idl +++ b/knRapid/src/rapidExtArcDds/StateMachineConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_StateMachineConfig_idl +#define rapid_ext_arc_StateMachineConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -57,3 +60,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_StateMachineConfig_idl diff --git a/knRapid/src/rapidExtArcDds/StateMachineState.idl b/knRapid/src/rapidExtArcDds/StateMachineState.idl index 4485c54..7bfc354 100644 --- a/knRapid/src/rapidExtArcDds/StateMachineState.idl +++ b/knRapid/src/rapidExtArcDds/StateMachineState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_StateMachineState_idl +#define rapid_ext_arc_StateMachineState_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -51,3 +54,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_StateMachineState_idl diff --git a/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl b/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl index c862b76..0757f89 100644 --- a/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl +++ b/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_TrackedObjectConfig_idl +#define rapid_ext_arc_TrackedObjectConfig_idl + /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -54,3 +57,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_TrackedObjectConfig_idl diff --git a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl b/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl index a0d9454..d8ed781 100644 --- a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl +++ b/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_TrackedObjectSample_idl +#define rapid_ext_arc_TrackedObjectSample_idl + /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -71,3 +74,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_arc_TrackedObjectSample_idl diff --git a/knRapid/src/rapidExtArcDds/WheelGroupSample.idl b/knRapid/src/rapidExtArcDds/WheelGroupSample.idl index 67362f3..cceb95d 100644 --- a/knRapid/src/rapidExtArcDds/WheelGroupSample.idl +++ b/knRapid/src/rapidExtArcDds/WheelGroupSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_arc_WheelGroupSample_idl +#define rapid_ext_arc_WheelGroupSample_idl + #include "BaseTypes.idl" #include "Message.idl" @@ -116,3 +119,5 @@ module rapid }; }; }; + +#endif // rapid_ext_arc_WheelGroupSample_idl diff --git a/knRapid/src/rapidExtDds/ExtCommandConstants.idl b/knRapid/src/rapidExtDds/ExtCommandConstants.idl index 4431253..edd7620 100644 --- a/knRapid/src/rapidExtDds/ExtCommandConstants.idl +++ b/knRapid/src/rapidExtDds/ExtCommandConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_ExtCommandConstants_idl +#define rapid_ext_ExtCommandConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -81,3 +84,5 @@ module rapid { }; }; + +#endif // rapid_ext_ExtCommandConstants_idl diff --git a/knRapid/src/rapidExtDds/ExtConstants.idl b/knRapid/src/rapidExtDds/ExtConstants.idl index e465c1b..1939d44 100644 --- a/knRapid/src/rapidExtDds/ExtConstants.idl +++ b/knRapid/src/rapidExtDds/ExtConstants.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_ExtConstants_idl +#define rapid_ext_ExtConstants_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -39,3 +42,5 @@ module rapid { const String64 VESTOP_STATE_TOPIC = "rapid_vestop_state"; }; }; + +#endif // rapid_ext_ExtConstants_idl diff --git a/knRapid/src/rapidExtDds/NavMapConfig.idl b/knRapid/src/rapidExtDds/NavMapConfig.idl index 7746f66..aed217e 100644 --- a/knRapid/src/rapidExtDds/NavMapConfig.idl +++ b/knRapid/src/rapidExtDds/NavMapConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_NavMapConfig_idl +#define rapid_ext_NavMapConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -70,3 +73,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_NavMapConfig_idl diff --git a/knRapid/src/rapidExtDds/NavMapSample.idl b/knRapid/src/rapidExtDds/NavMapSample.idl index 3823922..5980c52 100644 --- a/knRapid/src/rapidExtDds/NavMapSample.idl +++ b/knRapid/src/rapidExtDds/NavMapSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_NavMapSample_idl +#define rapid_ext_NavMapSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -108,3 +111,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_NavMapSample_idl diff --git a/knRapid/src/rapidExtDds/ProcessManagerConfig.idl b/knRapid/src/rapidExtDds/ProcessManagerConfig.idl index 59fd552..2394f97 100644 --- a/knRapid/src/rapidExtDds/ProcessManagerConfig.idl +++ b/knRapid/src/rapidExtDds/ProcessManagerConfig.idl @@ -56,4 +56,5 @@ module rapid }; }; }; + #endif // rapid_ext_ProcessManagerConfig_idl diff --git a/knRapid/src/rapidExtDds/RangeScanConfig.idl b/knRapid/src/rapidExtDds/RangeScanConfig.idl index 862176f..4263edf 100644 --- a/knRapid/src/rapidExtDds/RangeScanConfig.idl +++ b/knRapid/src/rapidExtDds/RangeScanConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_RangeScanConfig_idl +#define rapid_ext_RangeScanConfig_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -89,3 +92,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_RangeScanConfig_idl diff --git a/knRapid/src/rapidExtDds/RangeScanSample.idl b/knRapid/src/rapidExtDds/RangeScanSample.idl index 8d81f50..b4d007e 100644 --- a/knRapid/src/rapidExtDds/RangeScanSample.idl +++ b/knRapid/src/rapidExtDds/RangeScanSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_RangeScanSample_idl +#define rapid_ext_RangeScanSample_idl + /* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -54,3 +57,5 @@ module rapid { }; }; }; + +#endif // rapid_ext_RangeScanSample_idl diff --git a/knRapid/src/rapidExtDds/SystemInfoSample.idl b/knRapid/src/rapidExtDds/SystemInfoSample.idl index 37f0311..351762e 100644 --- a/knRapid/src/rapidExtDds/SystemInfoSample.idl +++ b/knRapid/src/rapidExtDds/SystemInfoSample.idl @@ -130,4 +130,4 @@ module rapid }; }; -#endif // rapid_SSystemInfo_idl +#endif // rapid_ext_SystemInfoSample_idl diff --git a/knRapid/src/rapidExtDds/Trajectory2DConfig.idl b/knRapid/src/rapidExtDds/Trajectory2DConfig.idl index bcbf880..174ae2a 100644 --- a/knRapid/src/rapidExtDds/Trajectory2DConfig.idl +++ b/knRapid/src/rapidExtDds/Trajectory2DConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_Trajectory2DConfig_idl +#define rapid_ext_Trajectory2DConfig_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -58,3 +61,5 @@ module rapid }; }; }; + +#endif // rapid_ext_Trajectory2DConfig_idl diff --git a/knRapid/src/rapidExtDds/Trajectory2DSample.idl b/knRapid/src/rapidExtDds/Trajectory2DSample.idl index 9618820..de4219d 100644 --- a/knRapid/src/rapidExtDds/Trajectory2DSample.idl +++ b/knRapid/src/rapidExtDds/Trajectory2DSample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_Trajectory2DSample_idl +#define rapid_ext_Trajectory2DSample_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -56,3 +59,5 @@ module rapid }; }; }; + +#endif // rapid_ext_Trajectory2DSample_idl diff --git a/knRapid/src/rapidExtDds/TrajectoryConfig.idl b/knRapid/src/rapidExtDds/TrajectoryConfig.idl index c5b9813..6efe89e 100644 --- a/knRapid/src/rapidExtDds/TrajectoryConfig.idl +++ b/knRapid/src/rapidExtDds/TrajectoryConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_TrajectoryConfig_idl +#define rapid_ext_TrajectoryConfig_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -40,3 +43,5 @@ module rapid{ }; }; }; + +#endif // rapid_ext_TrajectoryConfig_idl diff --git a/knRapid/src/rapidExtDds/TrajectorySample.idl b/knRapid/src/rapidExtDds/TrajectorySample.idl index 66c2ff5..45d753b 100644 --- a/knRapid/src/rapidExtDds/TrajectorySample.idl +++ b/knRapid/src/rapidExtDds/TrajectorySample.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_TrajectorySample_idl +#define rapid_ext_TrajectorySample_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -63,3 +66,5 @@ module rapid{ }; }; }; + +#endif // rapid_ext_TrajectorySample_idl diff --git a/knRapid/src/rapidExtDds/VEStopConfig.idl b/knRapid/src/rapidExtDds/VEStopConfig.idl index 4cd3c6d..65679aa 100644 --- a/knRapid/src/rapidExtDds/VEStopConfig.idl +++ b/knRapid/src/rapidExtDds/VEStopConfig.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_VEStopConfig_idl +#define rapid_ext_VEStopConfig_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -31,3 +34,5 @@ module rapid }; }; }; + +#endif // rapid_ext_VEStopConfig_idl diff --git a/knRapid/src/rapidExtDds/VEStopState.idl b/knRapid/src/rapidExtDds/VEStopState.idl index 965d41a..e9ecb3b 100644 --- a/knRapid/src/rapidExtDds/VEStopState.idl +++ b/knRapid/src/rapidExtDds/VEStopState.idl @@ -1,3 +1,6 @@ +#ifndef rapid_ext_VEStopState_idl +#define rapid_ext_VEStopState_idl + /* * Copyright (c) 2012 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -32,3 +35,5 @@ module rapid }; }; }; + +#endif // rapid_ext_VEStopState_idl From 93ccded438815a90cdb330cc16c62c710ee0186e Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 27 Oct 2015 23:42:33 +0000 Subject: [PATCH 19/90] Add predicted trajectory to TrackedObject and add IntersectionSample git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10599 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/ExtArcConstants.idl | 1 + .../rapidExtArcDds/NrcIntersectionSample.idl | 59 +++++++++++++++++++ .../rapidExtArcDds/TrackedObjectSample.idl | 11 +++- knRapid/src/rapidExtArcDds/Trajectory3D.idl | 31 ++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl create mode 100644 knRapid/src/rapidExtArcDds/Trajectory3D.idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 067d9f3..5e0ed7e 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -49,6 +49,7 @@ module rapid { const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_drivegoalwithlanes_sample"; + const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; }; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl b/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl new file mode 100644 index 0000000..7d3bd40 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl @@ -0,0 +1,59 @@ +#ifndef rapid_ext_arc_NrcIntersectionSample_idl +#define rapid_ext_arc_NrcIntersectionSample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + const octet INTERSECTION_TYPE_UNKNOWN = 0; + const octet INTERSECTION_TYPE_INTERSECTION = 117; + + const octet INTERSECTION_PHASE_UNDEFINED = 0; + const octet INTERSECTION_PHASE_GREEN_LIGHT = 93; + const octet INTERSECTION_PHASE_YELLOW_LIGHT = 94; + const octet INTERSECTION_PHASE_RED_LIGHT = 97; + + //@copy-c-declaration class NrcIntersectionSampleTypeSupport; + //@copy-c-declaration class NrcIntersectionSampleDataWriter; + //@copy-c-declaration class NrcIntersectionSampleDataReader; + //@copy-c-declaration struct NrcIntersectionSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcIntersectionSample + //@copy-declaration */ + valuetype NrcIntersectionSample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcIntersectionSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcIntersectionSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcIntersectionSampleDataReader DataReader; + //@copy-c-declaration typedef NrcIntersectionSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcIntersectionSample Type; + + //@copy-c-declaration /** distance to the center of the next intersection in meters */ + public float distance; + + //@copy-c-declaration /** type is unknown when the car is inside an intersection + //@copy-c-declaration * more types may be added later + //@copy-c-declaration */ + public octet type; + + //@copy-c-declaration /** phase of light is undefined when type is unknown. + //@copy-c-declaration * always green for stop signs, stop lines, and yield signs. + //@copy-c-declaration */ + public octet phase; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcIntersectionSample_idl diff --git a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl b/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl index d8ed781..4567dc6 100644 --- a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl +++ b/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl @@ -9,6 +9,7 @@ #include "Message.idl" #include "PointCloudSample.idl" +#include "Trajectory3D.idl" /** * \file @@ -20,6 +21,8 @@ module rapid { module ext { module arc { + + typedef sequence Trajectory3DSequence16; //@copy-c-declaration class TrackedObjectSampleTypeSupport; //@copy-c-declaration class TrackedObjectSampleDataWriter; @@ -64,12 +67,14 @@ module rapid { //@copy-declaration /** 3d points from sensed object */ public Vec3d pointsScale; - public PointSampleSequence points; - + public PointSampleSequence points; + + //@copy-declaration /** predicted trajectories */ + public Trajectory3DSequence16 predictedTrajectories; + //@copy-declaration /** Any Agent-specific information needed. */ public ValueSequence64 values; - //TODO: predicted trajectory }; }; }; diff --git a/knRapid/src/rapidExtArcDds/Trajectory3D.idl b/knRapid/src/rapidExtArcDds/Trajectory3D.idl new file mode 100644 index 0000000..f212d74 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/Trajectory3D.idl @@ -0,0 +1,31 @@ +#ifndef rapid_ext_arc_Trajectory3D_idl +#define rapid_ext_arc_Trajectory3D_idl + +#include "BaseTypes.idl" + +module rapid { + module ext { + module arc { + + //@copy-declaration /** + //@copy-declaration * pose rotation is assumed to be quaternion + //@copy-declaration */ + struct TrajPoint3D { + Transform3D pose; + //Transform3D velocity; + }; + + typedef sequence TrajPoint3DSequence; + struct Trajectory3D { + float weight; // weight of trajectory, if applicable + String32 name; // name of trajectory, if applicable + + long long t0; // first sample time in microseconds + long long tsep; // time separation of points, in microseconds + TrajPoint3DSequence points; + }; + }; + }; +}; + +#endif // rapid_ext_arc_Trajectory3D_idl From 88107322235a3b7664ed55e3a6eb575b63d29d51 Mon Sep 17 00:00:00 2001 From: mallan Date: Wed, 28 Oct 2015 21:04:23 +0000 Subject: [PATCH 20/90] fix nrc topic names git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10601 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/rapidExtArcDds/ExtArcConstants.idl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 5e0ed7e..6151dd0 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -48,8 +48,10 @@ module rapid { const String64 TRACKEDOBJECT_SAMPLE_TOPIC = "rapid_trackedobject_sample"; const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; - const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_drivegoalwithlanes_sample"; - const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; + const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcdrivegoalwithlanes_sample"; + const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; + const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; + const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; }; }; From 914b1ba8d43bc5f243632fddcecda2c3d61b37d6 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 30 Oct 2015 22:25:16 +0000 Subject: [PATCH 21/90] Pull DriveGoal out into DriveGoalSample git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10603 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/ExtArcConstants.idl | 2 + .../NrcDriveGoalWithLanesSample.idl | 45 ++----------------- .../rapidExtArcDds/NrcMapLaneSetSample.idl | 11 ++--- 3 files changed, 9 insertions(+), 49 deletions(-) diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 6151dd0..15af4b6 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -48,9 +48,11 @@ module rapid { const String64 TRACKEDOBJECT_SAMPLE_TOPIC = "rapid_trackedobject_sample"; const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; + const String64 NRCDRIVEGOAL_SAMPLE_TOPIC = "rapid_nrcdrivegoal_sample"; const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcdrivegoalwithlanes_sample"; const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; + const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl index 25ea47f..2e56eaa 100644 --- a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl @@ -1,6 +1,3 @@ -#ifndef rapid_ext_arc_NrcDriveGoalWithLanesSample_idl -#define rapid_ext_arc_NrcDriveGoalWithLanesSample_idl - /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -9,47 +6,13 @@ #include "Message.idl" #include "BaseTypes.idl" +#include "NrcDriveGoalSample.idl" #include "NrcMapLaneSetSample.idl" module rapid { module ext { module arc { - const octet NRC_STOP = 0; - const octet NRC_NO_STOP = 1; - - const octet NRC_ON_THIS_ROAD = 0; // Remain on this road but drive in any lane. - const octet NRC_STRICT_IN_THIS_LANE = 1; // Remain in the specified line and allow only small deviation into other lanes. For example, to pass a parked car - const octet NRC_RELAXED_IN_THIS_LANE = 2; // May move into other lanes briefly but return to this lane as soon a practical - const octet NRC_COME_TO_THIS_POINT = 3; - - //@copy-declaration /** - //@copy-declaration * Direct copy of NRC ROS type. - //@copy-declaration * Provides the next position in-lane position that the vehicle will drive to. - //@copy-declaration */ - struct DriveGoal { - long lane_id; - - //@copy /** Note: known as variable s with the mission planner. */ - float longitudinal_position; - - Transform3D pose; - - //@copy /** The desired speed of the vehicle in the segment between the end of the prevoius drive goal and arriving at this goal */ - float approach_speed; - - //@copy /** Speed limit on road */ - float speed_limit; - - //@copy /** Departure Constraints */ - octet departure_constraints; - - //@copy /** Controls the freedom of the behavior recipient to change lanes etc. */ - octet drive_mode; - }; - - typedef sequence DriveGoalSequence; - //@copy-c-declaration class NrcDriveGoalWithLanesSampleTypeSupport; //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataWriter; //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataReader; @@ -66,11 +29,11 @@ module rapid { //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleSeq Seq; //@copy-c-declaration #endif //@copy-c-declaration typedef NrcDriveGoalWithLanesSample Type; - public DriveGoalSequence drive_goals; - public MapLaneSequence map_lanes; + + public DriveGoalSequence64 drive_goals; + public MapLaneSequence8 map_lanes; }; }; }; }; -#endif // rapid_ext_arc_NrcDriveGoalWithLanesSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl index 66652c0..7b2630e 100644 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -1,6 +1,3 @@ -#ifndef rapid_ext_arc_NrcMapLaneSetSample_idl -#define rapid_ext_arc_NrcMapLaneSetSample_idl - /* * Copyright (c) 2015 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. @@ -35,7 +32,7 @@ module rapid { }; typedef sequence MapPointSequence512; - typedef sequence Vec2dSequence64; + typedef sequence Vec2dSequence64; //@copy-declaration /** Direct copy of NRC ROS type */ struct MapLine { @@ -67,7 +64,7 @@ module rapid { double transit_s; }; - typedef sequence MapLaneSequence; + typedef sequence MapLaneSequence8; //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; @@ -87,12 +84,10 @@ module rapid { //@copy-c-declaration #endif //@copy-c-declaration typedef NrcMapLaneSetSample Type; - public MapLaneSequence map_lanes; + public MapLaneSequence8 map_lanes; }; }; }; }; - -#endif // rapid_ext_arc_NrcMapLaneSetSample_idl From 6fbe5aa98ac11f704aab8ab19646e1d62c122d11 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 30 Oct 2015 22:35:38 +0000 Subject: [PATCH 22/90] oops, forgot to add NrcDriveGoalSample git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10605 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/NrcDriveGoalSample.idl | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl new file mode 100644 index 0000000..633b39d --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl @@ -0,0 +1,76 @@ +#ifndef rapid_ext_arc_NrcDriveGoalSample_idl +#define rapid_ext_arc_NrcDriveGoalSample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + // departure_constraints + const octet NRC_STOP = 0; + const octet NRC_NO_STOP = 1; + + // drive_modes + const octet NRC_ON_THIS_ROAD = 0; // Remain on this road but drive in any lane. + const octet NRC_STRICT_IN_THIS_LANE = 1; // Remain in the specified line and allow only small deviation into other lanes. For example, to pass a parked car + const octet NRC_RELAXED_IN_THIS_LANE = 2; // May move into other lanes briefly but return to this lane as soon a practical + const octet NRC_COME_TO_THIS_POINT = 3; + + //@copy-declaration /** + //@copy-declaration * Direct copy of NRC ROS type. + //@copy-declaration * Provides the next position in-lane position that the vehicle will drive to. + //@copy-declaration */ + struct DriveGoal { + long lane_id; + + //@copy /** Note: known as variable s with the mission planner. */ + float longitudinal_position; + + Transform3D pose; + + //@copy /** The desired speed of the vehicle in the segment between the end of the prevoius drive goal and arriving at this goal */ + float approach_speed; + + //@copy /** Speed limit on road */ + float speed_limit; + + //@copy /** Departure Constraints */ + octet departure_constraints; + + //@copy /** Controls the freedom of the behavior recipient to change lanes etc. */ + octet drive_mode; + }; + + typedef sequence DriveGoalSequence64; + + //@copy-c-declaration class NrcDriveGoalSampleTypeSupport; + //@copy-c-declaration class NrcDriveGoalSampleDataWriter; + //@copy-c-declaration class NrcDriveGoalSampleDataReader; + //@copy-c-declaration struct NrcDriveGoalSampleSeq; + //@copy-declaration /** + //@copy-declaration * NrcDriveGoalWithLanesSample + //@copy-declaration */ + valuetype NrcDriveGoalSample : Message { + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcDriveGoalSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcDriveGoalSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcDriveGoalSampleDataReader DataReader; + //@copy-c-declaration typedef NrcDriveGoalSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcDriveGoalSample Type; + public DriveGoalSequence64 drive_goals; + }; + }; + }; +}; + + + +#endif // rapid_ext_arc_NrcDriveGoalSample_idl From d91d12b2af4e27c8398b29ecff6d886f956c8917 Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 3 Nov 2015 19:59:34 +0000 Subject: [PATCH 23/90] add profile for TrackedObject git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10607 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/etc/RAPID_QOS_PROFILES.xml | 4 ++++ knRapid/src/rapidExtArcIo/RapidExtArcIoParameters.xml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/knRapid/etc/RAPID_QOS_PROFILES.xml b/knRapid/etc/RAPID_QOS_PROFILES.xml index 052f0d3..3e4ed9e 100644 --- a/knRapid/etc/RAPID_QOS_PROFILES.xml +++ b/knRapid/etc/RAPID_QOS_PROFILES.xml @@ -577,6 +577,10 @@ + + + + diff --git a/knRapid/src/rapidExtArcIo/RapidExtArcIoParameters.xml b/knRapid/src/rapidExtArcIo/RapidExtArcIoParameters.xml index d6a18e6..79d8389 100644 --- a/knRapid/src/rapidExtArcIo/RapidExtArcIoParameters.xml +++ b/knRapid/src/rapidExtArcIo/RapidExtArcIoParameters.xml @@ -142,8 +142,8 @@ - - + + From 44cfe49bfe8cce2185797c1a862fd644cfe53c70 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 6 Nov 2015 21:58:16 +0000 Subject: [PATCH 24/90] rework NrcMapLaneSetSample to reduce size git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10609 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcDds/NrcMapLaneSetSample.idl | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl index 7b2630e..e425a8a 100644 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl @@ -11,32 +11,32 @@ module rapid { module ext { module arc { - //@copy-declaration /** Direct copy of NRC ROS type */ + //@copy-declaration /** Direct copy of NRC ROS type NOTE: some members have been omitted because they are not used in practice */ struct MapPoint { float x; float y; - float z; + //float z; float theta; // height at the end of vector - float z_end; + //float z_end; float length; // position at MapLine. Start is 0 float s; // curvatures. If it's line, all curv_* is 0 - float curv_start; - float curv_mid; - float curv_end; + //float curv_start; + //float curv_mid; + //float curv_end; }; - typedef sequence MapPointSequence512; - typedef sequence Vec2dSequence64; + typedef sequence MapPointSequence1K; + typedef sequence Vec2fSequence64; //@copy-declaration /** Direct copy of NRC ROS type */ struct MapLine { - MapPointSequence512 map_points; + MapPointSequence1K map_points; String32 type; String32 road_mark_type; }; @@ -54,17 +54,18 @@ module rapid { long right_sibling_id; // "s" : distance along path from 1st point. - DoubleSequence64 stop_line_positions; + FloatSequence64 stop_line_positions; // "s", max speed [m/s] - Vec2dSequence64 speed_along_path; + Vec2fSequence64 speed_along_path; // "s" value to start transition to next lane // -1 means no transition - double transit_s; + float transit_s; }; - typedef sequence MapLaneSequence8; + typedef sequence MapLaneSequence8; + typedef sequence MapLaneSequence64; //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; @@ -84,7 +85,7 @@ module rapid { //@copy-c-declaration #endif //@copy-c-declaration typedef NrcMapLaneSetSample Type; - public MapLaneSequence8 map_lanes; + public MapLaneSequence64 map_lanes; }; }; From 67a933726edecd791e047cb2e3960888331d998f Mon Sep 17 00:00:00 2001 From: mallan Date: Mon, 9 Nov 2015 19:14:26 +0000 Subject: [PATCH 25/90] add RosMarkerArraySample git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10611 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcDds/RosMarkerArraySample.idl | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl diff --git a/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl new file mode 100644 index 0000000..c4e4252 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl @@ -0,0 +1,113 @@ +#ifndef rapid_ext_arc_RosMarkerArraySample_idl +#define rapid_ext_arc_RosMarkerArraySample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + enum ShapeType { + ARROW = 0, + CUBE = 1, + SPHERE = 2, + CYLINDER = 3, + LINE_STRIP = 4, + LINE_LIST = 5, + CUBE_LIST = 6, + SPHERE_LIST = 7, + POINTS = 8, + TEXT_VIEW_FACING = 9, + MESH_RESOURCE = 10, + TRIANGLE_LIST = 11 + }; + enum Action { + ADD = 0, + //MODIFY = 0, // (sic) + DELETE = 2, + DELETEALL = 3 + }; + + typedef sequence PointSequence1K; + typedef sequence ColorSequence1K; + + //@copy-declaration /** Direct copy of ROS type */ + struct Marker { + //@copy /** Namespace to place this object in... used in conjunction with id to create a unique name for the object */ + String32 ns; + + //@copy /** object ID useful in conjunction with the namespace for manipulating and deleting the object later */ + long id; + + //@copy /** Type of object */ + ShapeType type; + + //@copy /** 0 add/modify an object, 1 (deprecated), 2 deletes an object, 3 deletes all objects */ + Action action; + + //@copy /** Pose of the object */ + Transform3D pose; + + //@copy /** Scale of the object 1,1,1 means default (usually 1 meter square) */ + Vec3f scale; + + //@copy /** RGBA color [0.0-1.0] */ + Color4f color; + + //@copy /** NS How long (in nanoseconds) the object should last before being automatically deleted. 0 means forever */ + long long lifetime; + + //@copy /** If this marker should be frame-locked, i.e. retransformed into its frame every timestep */ + boolean frame_locked; + + //@copy /** Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...) */ + PointSequence1K points; + + //@copy + /** Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...) + number of colors must either be 0 or equal to the number of points + NOTE: alpha is not yet used */ + ColorSequence1K colors; + + //@copy /** NOTE: only used for text markers */ + String32 text; + + //@copy /** NOTE: only used for MESH_RESOURCE markers */ + String32 mesh_resource; + boolean mesh_use_embedded_materials; + }; + + typedef sequence MarkerArraySequence8; + + //@copy-c-declaration class RosMarkerArraySampleTypeSupport; + //@copy-c-declaration class RosMarkerArraySampleDataWriter; + //@copy-c-declaration class RosMarkerArraySampleDataReader; + //@copy-c-declaration struct RosMarkerArraySampleSeq; + + //@copy-declaration /** + //@copy-declaration * MarkerArraySample + //@copy-declaration */ + valuetype RosMarkerArraySample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef RosMarkerArraySampleTypeSupport TypeSupport; + //@copy-c-declaration typedef RosMarkerArraySampleDataWriter DataWriter; + //@copy-c-declaration typedef RosMarkerArraySampleDataReader DataReader; + //@copy-c-declaration typedef RosMarkerArraySampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef RosMarkerArraySample Type; + + public MarkerArraySequence8 marker_array; + }; + }; + }; +}; + + +#endif // rapid_ext_arc_RosMarkerArraySample_idl From 2df548abfafbd2da793448b0efbe63ae632477c3 Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 24 Nov 2015 17:54:38 +0000 Subject: [PATCH 26/90] add more Nrc types git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10613 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/ExtArcConstants.idl | 4 +- .../src/rapidExtArcDds/NrcClearanceSample.idl | 59 ++++++++++ .../NrcControllerStateSample.idl | 104 ++++++++++++++++++ 3 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 knRapid/src/rapidExtArcDds/NrcClearanceSample.idl create mode 100644 knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 15af4b6..a92c592 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -52,7 +52,9 @@ module rapid { const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcdrivegoalwithlanes_sample"; const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; - + const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; + const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; + const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl b/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl new file mode 100644 index 0000000..e8ed58d --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl @@ -0,0 +1,59 @@ +#ifndef rapid_ext_arc_NrcClearanceSample_idl +#define rapid_ext_arc_NrcClearanceSample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + // signal_type values + const octet SIGNAL_UNKNOWN = 0; + const octet SIGNAL_TRAFFIC_LIGHT_RED = 1; + const octet SIGNAL_TRAFFIC_LIGHT_YELLOW = 2; + const octet SIGNAL_TRAFFIC_LIGHT_GREEN = 3; + const octet SIGNAL_STOP_SIGN = 4; + const octet SIGNAL_STOP_LINE = 5; + const octet SIGNAL_YIELD_SIGN = 6; + const octet SIGNAL_CROSSWALK = 7; + + //@copy-c-declaration class NrcClearanceSampleTypeSupport; + //@copy-c-declaration class NrcClearanceSampleDataWriter; + //@copy-c-declaration class NrcClearanceSampleDataReader; + //@copy-c-declaration struct NrcClearanceSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcClearanceSample + //@copy-declaration */ + valuetype NrcClearanceSample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcClearanceSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcClearanceSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcClearanceSampleDataReader DataReader; + //@copy-c-declaration typedef NrcClearanceSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcClearanceSample Type; + + //@copy-c-declaration /** The type of the upcoming signal. + //@copy-c-declaration * It is unknown during a junction when the simulator (through ODR) cannot choose among overlapping lanes. + //@copy-c-declaration */ + public octet signal_type; + + //@copy-c-declaration /** clearance field is true when it is safe for the AV to go through the intersection */ + public boolean clearance; + + //@copy-c-declaration /** intersectionAhead is true when there is an intersection or crosswalk goal in the upcoming two goals within the mission plan */ + public boolean intersectionAhead; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcClearanceSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl b/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl new file mode 100644 index 0000000..1e653db --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl @@ -0,0 +1,104 @@ +#ifndef rapid_ext_arc_NrcControllerStateSample_idl +#define rapid_ext_arc_NrcControllerStateSample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + /** index for wheel_speeds and wheel_ticks */ + const octet NRC_WHEEL_FRONT_LEFT = 0; + const octet NRC_WHEEL_FRONT_RIGHT = 1; + const octet NRC_WHEEL_REAR_LEFT = 2; + const octet NRC_WHEEL_REAR_RIGHT = 3; + + /** status values */ + const octet NRC_ENABLED_LONGITUDINAL_CONTROL = 0x01; + const octet NRC_ENABLED_LATERAL_CONTROL = 0x02; + const octet NRC_ENABLED_AUTONOMY = 0x03; + const octet NRC_ENABLED_BREAK_OVERRIDE = 0x04; + const octet NRC_ENABLED_ACC_OVERRIDE = 0x08; + const octet NRC_ENABLED_STEER_OVERRIDE = 0x10; + + /** lane_planner_state values from LanePlannerState.msg */ + const octet NRC_PLANNER_IDLE = 0; + const octet NRC_PLANNER_ACTIVE = 1; + const octet NRC_PLANNER_SUBSTITUE_ROUTE = 2; + const octet NRC_PLANNER_LOST = 4; + const octet NRC_PLANNER_BLOCKED = 8; + const octet NRC_PLANNER_PREEMPTED = 16; + const octet NRC_PLANNER_NO_CONTROL = 32; + + typedef sequence DoubleSequence4; + + //@copy-c-declaration class NrcControllerStateSampleTypeSupport; + //@copy-c-declaration class NrcControllerStateSampleDataWriter; + //@copy-c-declaration class NrcControllerStateSampleDataReader; + //@copy-c-declaration struct NrcControllerStateSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcControllerStateSample + //@copy-declaration */ + valuetype NrcControllerStateSample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcControllerStateSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcControllerStateSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcControllerStateSampleDataReader DataReader; + //@copy-c-declaration typedef NrcControllerStateSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcControllerStateSample Type; + + //@copy-c-declaration /** distance to the center of the next intersection in meters */ + public float distance; + + //@copy-c-declaration /** type is unknown when the car is inside an intersection + //@copy-c-declaration * more types may be added later + //@copy-c-declaration */ + public octet type; + + //@copy-c-declaration /** phase of light is undefined when type is unknown. + //@copy-c-declaration * always green for stop signs, stop lines, and yield signs. + //@copy-c-declaration */ + public octet phase; + + //@copy-c-declaration /** bitfield indicating status + //@copy-c-declaration * negative values (most significant bit set) indicate an error condition + //@copy-c-declaration * positive values are for other status information + //@copy-c-declaration * please document bit-field values + //@copy-c-declaration * 0x00000001 enabled longitudinal ctrl + //@copy-c-declaration * 0x00000002 enabled lateral ctrl + //@copy-c-declaration * 0x00000003 enabled autonomy + //@copy-c-declaration * 0x00000004 break override + //@copy-c-declaration * 0x00000008 acc override + //@copy-c-declaration * 0x00000010 steer override + //@copy-c-declaration */ + public octet status; + + //@copy /** error information, leave blank if everything is shiny */ + public String32 status_message; + + //@copy /** velocity in m/s */ + public double velocity; + + //@copy /** steering angle in radians */ + public double steering_angle; + + //@copy //** e.g., wheel_speeds[NRC_WHEEL_FRONT_LEFT] */ + public DoubleSequence4 wheel_speeds; + public DoubleSequence4 wheel_ticks; + + public octet lane_planner_state; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcControllerStateSample_idl From c7558dc904cdb2c3df8151a6722532fc267de799 Mon Sep 17 00:00:00 2001 From: mallan Date: Sat, 28 Nov 2015 17:45:32 +0000 Subject: [PATCH 27/90] merge updates to TrackedObjectProvider git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10615 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcIo/TrackedObjectProvider.cpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp b/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp index bd4a8f0..b0b7d64 100644 --- a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp +++ b/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp @@ -1,3 +1,20 @@ +/* -*- C++ -*- ***************************************************************** + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +******************************************************************************/ #include "TrackedObjectProvider.h" #include "rapidExtArcDds/ExtArcConstants.h" @@ -16,6 +33,15 @@ namespace rapid params, entityName) { + rapid::ext::arc::TrackedObjectConfig& config = m_configSupplier.event(); + config.poseEncoding = (rapid::RotationEncoding)params.config.poseEncoding; + config.velocityEncoding = (rapid::RotationEncoding)params.config.velocityEncoding; + // classifications + config.classifications.length(params.config.classifications.size()); + for(unsigned i = 0; i < params.config.classifications.size(); i++) { + strncpy(config.classifications[i], params.config.classifications[i].c_str(), 16); + config.classifications[i][15] = '\0'; + } } } } From 4997bd9c2c7438c91796f519ae6dd412773923e7 Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 17 Dec 2015 01:49:30 +0000 Subject: [PATCH 28/90] pull LanePlannerState into a separate sample git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10617 71bd3d61-4118-0410-985d-8aea7a627388 --- .../src/rapidExtArcDds/ExtArcConstants.idl | 1 + .../NrcControllerStateSample.idl | 11 ---- .../NrcLanePlannerStateSample.idl | 57 +++++++++++++++++++ knRapid/src/rapidExtArcIo/CMakeLists.txt | 3 +- .../rapidExtArcIo/nrcMapLaneSetPrinter.cpp | 16 ++++++ 5 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl create mode 100644 knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index a92c592..4675ed1 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -53,6 +53,7 @@ module rapid { const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; + const String64 NRCLANEPLANNERSTATE_SAMPLE_TOPIC = "rapid_nrclaneplannerstate_sample"; const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; diff --git a/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl b/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl index 1e653db..d9e1a3f 100644 --- a/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl +++ b/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl @@ -27,15 +27,6 @@ module rapid { const octet NRC_ENABLED_ACC_OVERRIDE = 0x08; const octet NRC_ENABLED_STEER_OVERRIDE = 0x10; - /** lane_planner_state values from LanePlannerState.msg */ - const octet NRC_PLANNER_IDLE = 0; - const octet NRC_PLANNER_ACTIVE = 1; - const octet NRC_PLANNER_SUBSTITUE_ROUTE = 2; - const octet NRC_PLANNER_LOST = 4; - const octet NRC_PLANNER_BLOCKED = 8; - const octet NRC_PLANNER_PREEMPTED = 16; - const octet NRC_PLANNER_NO_CONTROL = 32; - typedef sequence DoubleSequence4; //@copy-c-declaration class NrcControllerStateSampleTypeSupport; @@ -94,8 +85,6 @@ module rapid { //@copy //** e.g., wheel_speeds[NRC_WHEEL_FRONT_LEFT] */ public DoubleSequence4 wheel_speeds; public DoubleSequence4 wheel_ticks; - - public octet lane_planner_state; }; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl b/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl new file mode 100644 index 0000000..32efdef --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl @@ -0,0 +1,57 @@ +#ifndef rapid_ext_arc_NrcLanePlannerStateSample_idl +#define rapid_ext_arc_NrcLanePlannerStateSample_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + /** planner_state values from LanePlannerState.msg */ + const octet NRC_PLANNER_IDLE = 0; + const octet NRC_PLANNER_ACTIVE = 1; + const octet NRC_PLANNER_SUBSTITUE_ROUTE = 2; + const octet NRC_PLANNER_LOST = 4; + const octet NRC_PLANNER_BLOCKED = 8; + const octet NRC_PLANNER_PREEMPTED = 16; + const octet NRC_PLANNER_NO_CONTROL = 32; + + //@copy-c-declaration class NrcLanePlannerStateSampleTypeSupport; + //@copy-c-declaration class NrcLanePlannerStateSampleDataWriter; + //@copy-c-declaration class NrcLanePlannerStateSampleDataReader; + //@copy-c-declaration struct NrcLanePlannerStateSampleSeq; + + //@copy-declaration /** + //@copy-declaration * NrcLanePlannerStateSample + //@copy-declaration */ + valuetype NrcLanePlannerStateSample : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcLanePlannerStateSampleTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcLanePlannerStateSampleDataWriter DataWriter; + //@copy-c-declaration typedef NrcLanePlannerStateSampleDataReader DataReader; + //@copy-c-declaration typedef NrcLanePlannerStateSampleSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcLanePlannerStateSample Type; + + public octet status; + + public String32 status_message; + + public octet planner_state; + + // todo: + //public MapLanePose vehicle_pose; + //public DriveGoal[] planning_horizon_goals; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcLanePlannerStateSample_idl diff --git a/knRapid/src/rapidExtArcIo/CMakeLists.txt b/knRapid/src/rapidExtArcIo/CMakeLists.txt index 6b79a89..35ad088 100644 --- a/knRapid/src/rapidExtArcIo/CMakeLists.txt +++ b/knRapid/src/rapidExtArcIo/CMakeLists.txt @@ -62,7 +62,7 @@ include_directories( ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/src/rapidDds + ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) link_libraries( @@ -102,6 +102,7 @@ set( TARGETS gpsPrinter hydraPrinter mobilitySamplePrinter + nrcMapLaneSetPrinter spectrumPrinter stateMachinePrinter systemInfoConfigPrinter diff --git a/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp b/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp new file mode 100644 index 0000000..048b526 --- /dev/null +++ b/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp @@ -0,0 +1,16 @@ +#include "rapidUtil/GenericPrinter_T.h" + +#include "rapidExtArcDds/NrcMapLaneSetSample.h" +#include "rapidExtArcDds/NrcMapLaneSetSampleSupport.h" +#include "rapidExtArcDds/ExtArcConstants.h" + +#include + +using namespace rapid; +int main(int argc, char *argv[]) +{ + GenericPrinter_T printer(argc, argv, + "RapidSampleQos"); + printer.run(ext::arc::NRCMAPLANESET_SAMPLE_TOPIC); + return 0; +} From 026ff8d71c4af48adeae4a77d5d2e5f44dfd9af1 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 17 Dec 2015 09:18:51 -0800 Subject: [PATCH 29/90] Some more rotation helpers --- kn/src/knMath/EulerAngles.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kn/src/knMath/EulerAngles.h b/kn/src/knMath/EulerAngles.h index ee30bb7..a7ad640 100644 --- a/kn/src/knMath/EulerAngles.h +++ b/kn/src/knMath/EulerAngles.h @@ -68,6 +68,27 @@ namespace kn return atan2(rotationMatrix(1,0), rotationMatrix(0,0)); } + inline + double + rotationMatrixToYaw(Matrix2x2 const& rotationMatrix) + { + return atan2(rotationMatrix.coeff(1,0), rotationMatrix.coeff(0,0)); + + } + + inline + double + angleOfVector2d(Eigen::Vector2d const& v) { + return atan2(v.y(), v.x()); + } + + inline + Eigen::Matrix2d rotationFromUnitVector(Eigen::Vector2d const& v) { + Eigen::Matrix2d r; + r << v.x(), -v.y(), v.y(), v.x(); + return r; + } + /** @ingroup knMath * * @brief Convert rotation matrix to euler angles. From caaf152304398514004d108bb9374b600f738ff9 Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 8 Mar 2016 18:57:39 +0000 Subject: [PATCH 30/90] merge: Add camera command definitions and NrcInterventionRequest git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10619 71bd3d61-4118-0410-985d-8aea7a627388 --- .../rapidExtArcDds/ExtArcCommandConstants.idl | 37 ++++++++ .../src/rapidExtArcDds/ExtArcConstants.idl | 1 + .../rapidExtArcDds/NrcInterventionRequest.idl | 86 +++++++++++++++++++ knRapid/src/rapidUtil/RapidUtilParameters.xml | 2 +- 4 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl diff --git a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl index 85b7fff..fd3cc0e 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl @@ -111,6 +111,36 @@ module rapid { const String32 IMGSTREAM_METHOD_setResolution_PARAM_divisor = "divisor"; // 1 == full res, 2 = half res, etc. const DataType IMGSTREAM_METHOD_setResolution_DTYPE_divisor = RAPID_INT; + const String32 IMGSTREAM_METHOD_setResizeWidth = "setResizeWidth"; + const String32 IMGSTREAM_METHOD_setResizeWidth_PARAM_width = "width"; + const DataType IMGSTREAM_METHOD_setResizeWidth_DTYPE_width = RAPID_INT; + + const String32 IMGSTREAM_METHOD_setResizeHeight = "setResizeHeight"; + const String32 IMGSTREAM_METHOD_setResizeHeight_PARAM_height = "height"; + const DataType IMGSTREAM_METHOD_setResizeHeight_DTYPE_height = RAPID_INT; + + const String32 IMGSTREAM_METHOD_setResize = "setResize"; + const String32 IMGSTREAM_METHOD_setResize_PARAM_width = "width"; + const DataType IMGSTREAM_METHOD_setResize_DTYPE_width = RAPID_INT; + const String32 IMGSTREAM_METHOD_setResize_PARAM_height = "height"; + const DataType IMGSTREAM_METHOD_setResize_DTYPE_height = RAPID_INT; + + // Compression quality + const String32 IMGSTREAM_METHOD_setResizeQuality = "setResizeQuality"; + const String32 IMGSTREAM_METHOD_setResizeQuality_PARAM_quality = "quality"; // resize quality, 0~4 (0 always nearest neighbor) + const DataType IMGSTREAM_METHOD_setResizeQuality_DTYPE_quality = RAPID_INT; + + const String32 IMGSTREAM_METHOD_setCrop = "setCrop"; + const String32 IMGSTREAM_METHOD_setCrop_PARAM_cropX = "cropX"; + const DataType IMGSTREAM_METHOD_setCrop_DTYPE_cropX = RAPID_INT; + const String32 IMGSTREAM_METHOD_setCrop_PARAM_cropY = "cropY"; + const DataType IMGSTREAM_METHOD_setCrop_DTYPE_cropY = RAPID_INT; + const String32 IMGSTREAM_METHOD_setCrop_PARAM_width = "width"; + const DataType IMGSTREAM_METHOD_setCrop_DTYPE_width = RAPID_INT; + const String32 IMGSTREAM_METHOD_setCrop_PARAM_height = "height"; + const DataType IMGSTREAM_METHOD_setCrop_DTYPE_height = RAPID_INT; + + // Compression quality const String32 IMGSTREAM_METHOD_setQuality = "setQuality"; const String32 IMGSTREAM_METHOD_setQuality_PARAM_quality = "quality"; // jpeg quality, range 0-100 const DataType IMGSTREAM_METHOD_setQuality_DTYPE_quality = RAPID_INT; @@ -121,9 +151,16 @@ module rapid { const String32 IMGSTREAM_METHOD_reconnect = "reconnect"; + const String32 ADVNAV = "AdvNav"; const String32 ADVNAV_METHOD_startGlobalAlign = "startGlobalAlign"; + + const String32 ROSBRIDGE = "RosBridge"; + const String32 ROSBRIDGE_METHOD_setMinSeparation = "setMinSeparation"; + const String32 ROSBRIDGE_METHOD_setMinSeparation_PARAM_msec = "msec"; // min separation between images in milliseconds + const DataType ROSBRIDGE_METHOD_setMinSeparation_DTYPE_msec = RAPID_INT; + }; }; }; diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 4675ed1..dba9cfc 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -55,6 +55,7 @@ module rapid { const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; const String64 NRCLANEPLANNERSTATE_SAMPLE_TOPIC = "rapid_nrclaneplannerstate_sample"; const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; + const String64 NRCINTERVENTIONREQUEST_TOPIC = "rapid_interventionrequest"; const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl new file mode 100644 index 0000000..4a82120 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl @@ -0,0 +1,86 @@ +#ifndef rapid_ext_arc_NrcInterventionRequest_idl +#define rapid_ext_arc_NrcInterventionRequest_idl + +/* + * Copyright (c) 2015 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + enum Category { + CATEGORY_UNDEFINED, + CATEGORY_COLLISION, + CATEGORY_CONSTRUCTION_ZONE, + CATEGORY_ROAD_OBSTRUCTION, + CATEGORY_MECHANICAL_FAILURE, + CATEGORY_SENSOR_FAILURE, + CATEGORY_PLANNING_FAILURE, + CATEGORY_TRAFFIC_CONTROLLER + }; + typedef sequence CategorySequence; + + enum Severity { + SEVERITY_IGNORE, + SEVERITY_LOW, + SEVERITY_MEDIUM, + SEVERITY_HIGH + }; + + //@copy-c-declaration class NrcInterventionRequestTypeSupport; + //@copy-c-declaration class NrcInterventionRequestDataWriter; + //@copy-c-declaration class NrcInterventionRequestDataReader; + //@copy-c-declaration struct NrcInterventionRequestSeq; + + //@copy-declaration /** + //@copy-declaration * NrcInterventionRequest + //@copy-declaration */ + valuetype NrcInterventionRequest : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcInterventionRequestTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcInterventionRequestDataWriter DataWriter; + //@copy-c-declaration typedef NrcInterventionRequestDataReader DataReader; + //@copy-c-declaration typedef NrcInterventionRequestSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcInterventionRequest Type; + + /** + * Unique id for situation. Updates to same situation will use same requestId + */ + public long requestId; //@key + /** + * How urgently an intervention is required. Scale of 0-n (TBD) + */ + public long urgency; + /** + * Situation categories that led to intervention request. + * Each request should have at least one category. A situation + * may be a combination of categories, e.g. roadwork blocking + * the road with a flag person would be: + * CATEGORY_ROAD_OBSTRUCTION, CATEGORY_CONSTRUCTION_ZONE, CATEGORY_TRAFFIC_CONTROLLER + */ + public CategorySequence category; + /** + * Severity of situation, e.g. if category is COLLISION, + * SEVERITY_LOW would be tapping a garbage can + * SEVERITY_HIGH would be a freeway pileup + */ + public Severity severity; + /** + * Optional message to convey more information about the request. + * E.g. if category is CATEGORY_SENSOR_FAILURE, message could + * contain what sensor(s) failed + */ + public String128 message; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcInterventionRequest_idl diff --git a/knRapid/src/rapidUtil/RapidUtilParameters.xml b/knRapid/src/rapidUtil/RapidUtilParameters.xml index a2dcb83..553cd9c 100644 --- a/knRapid/src/rapidUtil/RapidUtilParameters.xml +++ b/knRapid/src/rapidUtil/RapidUtilParameters.xml @@ -11,7 +11,7 @@ - + From 02d8f7de75a65f0e0559b6851fbca813392bf26b Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 8 Mar 2016 16:04:35 -0800 Subject: [PATCH 31/90] attempt to silence warnings from generated code --- knRapid/cmake/knRapid-extras.cmake.develspace.in | 11 ++++++++++- knRapid/cmake/knRapid-extras.cmake.installspace.in | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/knRapid/cmake/knRapid-extras.cmake.develspace.in b/knRapid/cmake/knRapid-extras.cmake.develspace.in index 50c4291..3f7d5ba 100644 --- a/knRapid/cmake/knRapid-extras.cmake.develspace.in +++ b/knRapid/cmake/knRapid-extras.cmake.develspace.in @@ -8,4 +8,13 @@ set(KNRAPID_INCLUDE_DIR @CATKIN_DEVEL_PREFIX@/include @CATKIN_DEVEL_PREFIX@/include/rapidExtArcDds ) ## add include dirs to catkin_INCLUDE_DIRS -set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) \ No newline at end of file +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) + +if( NOT KNRAPID_COMPILER_FLAGS_HAS_RUN ) + if( CMAKE_COMPILER_IS_GNUCXX ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings" + CACHE STRING "Flags used by the C++ compiler during all build types." + FORCE ) + endif () + set( KNRAPID_COMPILER_FLAGS_HAS_RUN ON CACHE INTERNAL "one-time setup of compiler warning flags for generated DDS code" FORCE) +endif() diff --git a/knRapid/cmake/knRapid-extras.cmake.installspace.in b/knRapid/cmake/knRapid-extras.cmake.installspace.in index 23c8a92..d9fa2b8 100644 --- a/knRapid/cmake/knRapid-extras.cmake.installspace.in +++ b/knRapid/cmake/knRapid-extras.cmake.installspace.in @@ -8,4 +8,13 @@ set(KNRAPID_INCLUDE_DIR @CMAKE_INSTALL_PREFIX@/include @CMAKE_INSTALL_PREFIX@/include/rapidExtArcDds ) ## add include dirs to catkin_INCLUDE_DIRS -set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) \ No newline at end of file +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) + +if( NOT KNRAPID_COMPILER_FLAGS_HAS_RUN ) + if( CMAKE_COMPILER_IS_GNUCXX ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings" + CACHE STRING "Flags used by the C++ compiler during all build types." + FORCE ) + endif () + set( KNRAPID_COMPILER_FLAGS_HAS_RUN ON CACHE INTERNAL "one-time setup of compiler warning flags for generated DDS code" FORCE) +endif() From 96c5696dff89b3682a6d1a15979356b57291ae92 Mon Sep 17 00:00:00 2001 From: mallan Date: Wed, 15 Jun 2016 20:54:40 +0000 Subject: [PATCH 32/90] merge InterventionResponse and ImageRegions into soraCore git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10624 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/etc/RAPID_QOS_PROFILES.xml | 16 +++++ .../src/rapidExtArcDds/ExtArcConstants.idl | 10 +-- .../src/rapidExtArcDds/NrcImageRegions.idl | 69 +++++++++++++++++++ .../rapidExtArcDds/NrcInterventionRequest.idl | 5 ++ .../NrcInterventionResponse.idl | 57 +++++++++++++++ 5 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 knRapid/src/rapidExtArcDds/NrcImageRegions.idl create mode 100644 knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl diff --git a/knRapid/etc/RAPID_QOS_PROFILES.xml b/knRapid/etc/RAPID_QOS_PROFILES.xml index 3e4ed9e..1f3e9c0 100644 --- a/knRapid/etc/RAPID_QOS_PROFILES.xml +++ b/knRapid/etc/RAPID_QOS_PROFILES.xml @@ -603,6 +603,22 @@ + + + + + + + + + + + + + + + + diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index dba9cfc..473670e 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -48,14 +48,16 @@ module rapid { const String64 TRACKEDOBJECT_SAMPLE_TOPIC = "rapid_trackedobject_sample"; const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; + const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; + const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; const String64 NRCDRIVEGOAL_SAMPLE_TOPIC = "rapid_nrcdrivegoal_sample"; const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcdrivegoalwithlanes_sample"; + const String64 NRCIMAGEREGIONS_SAMPLE_TOPIC = "rapid_nrcimageregions_sample"; const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; - const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; - const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; + const String64 NRCINTERVENTIONREQUEST_TOPIC = "rapid_nrcinterventionrequest_sample"; + const String64 NRCINTERVENTIONRESPONSE_TOPIC = "rapid_nrcinterventionresponse_sample"; const String64 NRCLANEPLANNERSTATE_SAMPLE_TOPIC = "rapid_nrclaneplannerstate_sample"; - const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; - const String64 NRCINTERVENTIONREQUEST_TOPIC = "rapid_interventionrequest"; + const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; diff --git a/knRapid/src/rapidExtArcDds/NrcImageRegions.idl b/knRapid/src/rapidExtArcDds/NrcImageRegions.idl new file mode 100644 index 0000000..2b29b15 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcImageRegions.idl @@ -0,0 +1,69 @@ +#ifndef rapid_ext_arc_NrcImageRegions_idl +#define rapid_ext_arc_NrcImageRegions_idl + +/* + * Copyright (c) 2016 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + const String32 IMGROI_CLASS_FACE = "face"; + const String32 IMGROI_CLASS_PEDESTRIAN = "pedestrian"; + const String32 IMGROI_CLASS_ROAD_SIGN = "road_sign"; + const String32 IMGROI_CLASS_STREET_SIGN = "street_sign"; + const String32 IMGROI_CLASS_TRAFFIC_LIGHT = "traffic_light"; + const String32 IMGROI_CLASS_USER_DEFINED = "user_defined"; + + //@copy-declaration /** + //@copy-declaration * Image region coordinates are given in range of 0..1 and + //@copy-declaration * must be scaled by image size to obtain pixel coordinates. + //@copy-declaration */ + struct ImageRegion { + //@copy-declaration /** upper left corner of region, range 0..1 */ + Vec2f xy; + //@copy-declaration /** size of region */ + Vec2f size; + //@copy-declaration /** unique identifier for region (tracking id) */ + long long regionId; + //@copy-declaration /** classification of region, e.g. pedestrian, sign, etc. */ + String32 classification; + //@copy-declaration /** json encoded string containing additional meta data (optional) */ + String128 meta; + }; + + typedef sequence ImageRegionSequence; + + //@copy-c-declaration class NrcImageRegionsTypeSupport; + //@copy-c-declaration class NrcImageRegionsDataWriter; + //@copy-c-declaration class NrcImageRegionsDataReader; + //@copy-c-declaration struct NrcImageRegionsSeq; + + //@copy-declaration /** + //@copy-declaration * NrcImageRegions + //@copy-declaration */ + valuetype NrcImageRegions : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcImageRegionsTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcImageRegionsDataWriter DataWriter; + //@copy-c-declaration typedef NrcImageRegionsDataReader DataReader; + //@copy-c-declaration typedef NrcImageRegionsSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcImageRegions Type; + + /** identifier of camera stream that these image regions are associated with */ + public String64 cameraId; + /** regions of interest */ + public ImageRegionSequence rois; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcImageRegions_idl diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl index 4a82120..b9993ba 100644 --- a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl +++ b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl @@ -78,6 +78,11 @@ module rapid { * contain what sensor(s) failed */ public String128 message; + /** + * json encoded string with proposed solution (if any) + */ + public String2K solution; + }; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl b/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl new file mode 100644 index 0000000..d2e37c8 --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl @@ -0,0 +1,57 @@ +#ifndef rapid_ext_arc_NrcInterventionResponse_idl +#define rapid_ext_arc_NrcInterventionResponse_idl + +/* + * Copyright (c) 2016 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + */ + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + enum ResponseType { + RESPONSE_TYPE_NOOP, + RESPONSE_TYPE_ACCEPTED, // teleoperator has accepted this request + RESPONSE_TYPE_REJECTED, // teleoperator has rejected this request + RESPONSE_TYPE_COMPLETED, // teleoperator has finished working on this request + RESPONSE_TYPE_ATTENDING, // teleoperator is working on a solution + RESPONSE_TYPE_SOLUTION, // teleoperator has sent an actionable solution + RESPONSE_TYPE_STATEMENT, // communication intended for vehicle occupant + RESPONSE_TYPE_NOTE // teleoperator note about this teleop zone and/or solution + }; + + //@copy-c-declaration class NrcInterventionResponseTypeSupport; + //@copy-c-declaration class NrcInterventionResponseDataWriter; + //@copy-c-declaration class NrcInterventionResponseDataReader; + //@copy-c-declaration struct NrcInterventionResponseSeq; + + //@copy-declaration /** + //@copy-declaration * NrcInterventionResponse + //@copy-declaration */ + valuetype NrcInterventionResponse : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcInterventionResponseTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcInterventionResponseDataWriter DataWriter; + //@copy-c-declaration typedef NrcInterventionResponseDataReader DataReader; + //@copy-c-declaration typedef NrcInterventionResponseSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcInterventionResponse Type; + + /** Unique id for situation originating from InterventionRequest */ + public long long requestId; + /** identifier of teleoperator console */ + public String32 operatorId; + + public ResponseType responseType; + public String2K responseData; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcInterventionResponse_idl From 7c16c810c15e5a23b913e23bd86295a54db3da94 Mon Sep 17 00:00:00 2001 From: "Mark B. Allan" Date: Wed, 24 Aug 2016 17:45:32 -0700 Subject: [PATCH 33/90] add gimbal command: --- knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl index fd3cc0e..ec477a8 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl @@ -161,6 +161,13 @@ module rapid { const String32 ROSBRIDGE_METHOD_setMinSeparation_PARAM_msec = "msec"; // min separation between images in milliseconds const DataType ROSBRIDGE_METHOD_setMinSeparation_DTYPE_msec = RAPID_INT; + const String32 GIMBAL = "Gimbal"; + const String32 GIMBAL_METHOD_setPanTilt = "setPanTilt"; + const String32 GIMBAL_METHOD_setPanTilt_PARAM_pan = "pan"; + const DataType GIMBAL_METHOD_setPanTilt_DTYPE_pan = RAPID_FLOAT; + const String32 GIMBAL_METHOD_setPanTilt_PARAM_tilt = "tilt"; + const DataType GIMBAL_METHOD_setPanTilt_DTYPE_tilt = RAPID_FLOAT; + }; }; }; From d035b655b7a21f45afb12f2e7114d68af91a3b21 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 29 Sep 2016 12:55:38 -0700 Subject: [PATCH 34/90] Add zoneId field Update submitted from Mauro --- knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl index b9993ba..ce4da77 100644 --- a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl +++ b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl @@ -53,7 +53,7 @@ module rapid { /** * Unique id for situation. Updates to same situation will use same requestId */ - public long requestId; //@key + public long requestId; //@key /** * How urgently an intervention is required. Scale of 0-n (TBD) */ @@ -82,6 +82,10 @@ module rapid { * json encoded string with proposed solution (if any) */ public String2K solution; + /** + * Unique id for zone. + */ + public long zoneId; }; }; From ad5d7ee348e7837181106f15cdaba0fff8dfdbdf Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 13 Oct 2016 12:02:08 -0700 Subject: [PATCH 35/90] Changes submitted by Mauro --- knRapid/etc/RAPID_QOS_PROFILES.xml | 1 + .../src/rapidExtArcDds/ExtArcConstants.idl | 1 + .../NrcMapAnnotationsUpdate.idl | 41 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl diff --git a/knRapid/etc/RAPID_QOS_PROFILES.xml b/knRapid/etc/RAPID_QOS_PROFILES.xml index 1f3e9c0..fb606cd 100644 --- a/knRapid/etc/RAPID_QOS_PROFILES.xml +++ b/knRapid/etc/RAPID_QOS_PROFILES.xml @@ -613,6 +613,7 @@ + diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 473670e..096ba58 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -58,6 +58,7 @@ module rapid { const String64 NRCINTERVENTIONRESPONSE_TOPIC = "rapid_nrcinterventionresponse_sample"; const String64 NRCLANEPLANNERSTATE_SAMPLE_TOPIC = "rapid_nrclaneplannerstate_sample"; const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; + const String64 NRCMAPANNOTATIONSUPDATE_TOPIC = "rapid_nrcmapannotationsupdate_sample"; const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; diff --git a/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl b/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl new file mode 100644 index 0000000..731590a --- /dev/null +++ b/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl @@ -0,0 +1,41 @@ +#ifndef rapid_ext_arc_NrcMapAnnotationsUpdate_idl +#define rapid_ext_arc_NrcMapAnnotationsUpdate_idl + +#include "Message.idl" + +module rapid { + module ext { + module arc { + + //@copy-c-declaration class NrcMapAnnotationsUpdateTypeSupport; + //@copy-c-declaration class NrcMapAnnotationsUpdateDataWriter; + //@copy-c-declaration class NrcMapAnnotationsUpdateDataReader; + //@copy-c-declaration struct NrcMapAnnotationsUpdateSeq; + + //@copy-declaration /** + //@copy-declaration * NrcMapAnnotationsUpdate + //@copy-declaration */ + valuetype NrcMapAnnotationsUpdate : Message { + + //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) + //@copy-c-declaration typedef NrcMapAnnotationsUpdateTypeSupport TypeSupport; + //@copy-c-declaration typedef NrcMapAnnotationsUpdateDataWriter DataWriter; + //@copy-c-declaration typedef NrcMapAnnotationsUpdateDataReader DataReader; + //@copy-c-declaration typedef NrcMapAnnotationsUpdateSeq Seq; + //@copy-c-declaration #endif + //@copy-c-declaration typedef NrcMapAnnotationsUpdate Type; + + /** + * Unique id for situation. Updates to same situation will use same requestId + */ + public long messageId; //@key + /** + * json encoded string with proposed solution (if any) + */ + public String2K updatedAnnotationFile; + }; + }; + }; +}; + +#endif // rapid_ext_arc_NrcMapAnnotationsUpdate_idl From ddc9a7b1325cdf385a81897c0771d7e100d59505 Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 25 Oct 2016 21:23:31 +0000 Subject: [PATCH 36/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10645 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/etc/RAPID_QOS_PROFILES.xml | 2 +- .../src/rapidExtArcDds/ExtArcConstants.idl | 13 --- .../src/rapidExtArcDds/NrcClearanceSample.idl | 59 ------------ .../NrcControllerStateSample.idl | 93 ------------------ .../src/rapidExtArcDds/NrcDriveGoalSample.idl | 76 --------------- .../NrcDriveGoalWithLanesSample.idl | 39 -------- .../src/rapidExtArcDds/NrcImageRegions.idl | 69 -------------- .../rapidExtArcDds/NrcIntersectionSample.idl | 59 ------------ .../rapidExtArcDds/NrcInterventionRequest.idl | 91 ------------------ .../NrcInterventionResponse.idl | 57 ----------- .../NrcLanePlannerStateSample.idl | 57 ----------- .../rapidExtArcDds/NrcMapLaneSetSample.idl | 94 ------------------- .../rapidExtArcDds/TrackedObjectConfig.idl | 61 ------------ .../rapidExtArcDds/TrackedObjectSample.idl | 83 ---------------- knRapid/src/rapidExtArcIo/CMakeLists.txt | 6 -- knRapid/src/rapidExtArcIo/TrackedObjectIo.cpp | 65 ------------- knRapid/src/rapidExtArcIo/TrackedObjectIo.h | 22 ----- .../rapidExtArcIo/TrackedObjectProvider.cpp | 48 ---------- .../src/rapidExtArcIo/TrackedObjectProvider.h | 35 ------- .../rapidExtArcIo/nrcMapLaneSetPrinter.cpp | 16 ---- .../rapidExtArcIo/trackedObjectPrinter.cpp | 29 ------ 21 files changed, 1 insertion(+), 1073 deletions(-) delete mode 100644 knRapid/src/rapidExtArcDds/NrcClearanceSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcImageRegions.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl delete mode 100644 knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl delete mode 100644 knRapid/src/rapidExtArcDds/TrackedObjectSample.idl delete mode 100644 knRapid/src/rapidExtArcIo/TrackedObjectIo.cpp delete mode 100644 knRapid/src/rapidExtArcIo/TrackedObjectIo.h delete mode 100644 knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp delete mode 100644 knRapid/src/rapidExtArcIo/TrackedObjectProvider.h delete mode 100644 knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp delete mode 100644 knRapid/src/rapidExtArcIo/trackedObjectPrinter.cpp diff --git a/knRapid/etc/RAPID_QOS_PROFILES.xml b/knRapid/etc/RAPID_QOS_PROFILES.xml index 1f3e9c0..8a1a30a 100644 --- a/knRapid/etc/RAPID_QOS_PROFILES.xml +++ b/knRapid/etc/RAPID_QOS_PROFILES.xml @@ -251,7 +251,7 @@ - + RELIABLE_RELIABILITY_QOS diff --git a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl index 473670e..31d7b08 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcConstants.idl @@ -44,21 +44,8 @@ module rapid { const String64 SPECTRUM_SAMPLE_TOPIC = "rapid_spectrum_sample"; const String64 STATEMACHINE_CONFIG_TOPIC = "rapid_statemachine_config"; const String64 STATEMACHINE_STATE_TOPIC = "rapid_statemachine_state"; - const String64 TRACKEDOBJECT_CONFIG_TOPIC = "rapid_trackedobject_config"; - const String64 TRACKEDOBJECT_SAMPLE_TOPIC = "rapid_trackedobject_sample"; const String64 WHEELGROUP_SAMPLE_TOPIC = "rapid_wheelgroup_sample"; - const String64 NRCCLEARANCE_SAMPLE_TOPIC = "rapid_nrcclearance_sample"; - const String64 NRCCONTROLLERSTATE_SAMPLE_TOPIC = "rapid_nrccontrollerstate_sample"; - const String64 NRCDRIVEGOAL_SAMPLE_TOPIC = "rapid_nrcdrivegoal_sample"; - const String64 NRCDRIVEGOALWITHLANES_SAMPLE_TOPIC = "rapid_nrcdrivegoalwithlanes_sample"; - const String64 NRCIMAGEREGIONS_SAMPLE_TOPIC = "rapid_nrcimageregions_sample"; - const String64 NRCINTERSECTION_SAMPLE_TOPIC = "rapid_nrcintersection_sample"; - const String64 NRCINTERVENTIONREQUEST_TOPIC = "rapid_nrcinterventionrequest_sample"; - const String64 NRCINTERVENTIONRESPONSE_TOPIC = "rapid_nrcinterventionresponse_sample"; - const String64 NRCLANEPLANNERSTATE_SAMPLE_TOPIC = "rapid_nrclaneplannerstate_sample"; - const String64 NRCMAPLANESET_SAMPLE_TOPIC = "rapid_nrcmaplaneset_sample"; - const String64 ROSMARKERARRAY_SAMPLE_TOPIC = "rapid_rosmarkerarray_sample"; }; }; diff --git a/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl b/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl deleted file mode 100644 index e8ed58d..0000000 --- a/knRapid/src/rapidExtArcDds/NrcClearanceSample.idl +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef rapid_ext_arc_NrcClearanceSample_idl -#define rapid_ext_arc_NrcClearanceSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - // signal_type values - const octet SIGNAL_UNKNOWN = 0; - const octet SIGNAL_TRAFFIC_LIGHT_RED = 1; - const octet SIGNAL_TRAFFIC_LIGHT_YELLOW = 2; - const octet SIGNAL_TRAFFIC_LIGHT_GREEN = 3; - const octet SIGNAL_STOP_SIGN = 4; - const octet SIGNAL_STOP_LINE = 5; - const octet SIGNAL_YIELD_SIGN = 6; - const octet SIGNAL_CROSSWALK = 7; - - //@copy-c-declaration class NrcClearanceSampleTypeSupport; - //@copy-c-declaration class NrcClearanceSampleDataWriter; - //@copy-c-declaration class NrcClearanceSampleDataReader; - //@copy-c-declaration struct NrcClearanceSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcClearanceSample - //@copy-declaration */ - valuetype NrcClearanceSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcClearanceSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcClearanceSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcClearanceSampleDataReader DataReader; - //@copy-c-declaration typedef NrcClearanceSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcClearanceSample Type; - - //@copy-c-declaration /** The type of the upcoming signal. - //@copy-c-declaration * It is unknown during a junction when the simulator (through ODR) cannot choose among overlapping lanes. - //@copy-c-declaration */ - public octet signal_type; - - //@copy-c-declaration /** clearance field is true when it is safe for the AV to go through the intersection */ - public boolean clearance; - - //@copy-c-declaration /** intersectionAhead is true when there is an intersection or crosswalk goal in the upcoming two goals within the mission plan */ - public boolean intersectionAhead; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcClearanceSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl b/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl deleted file mode 100644 index d9e1a3f..0000000 --- a/knRapid/src/rapidExtArcDds/NrcControllerStateSample.idl +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef rapid_ext_arc_NrcControllerStateSample_idl -#define rapid_ext_arc_NrcControllerStateSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - /** index for wheel_speeds and wheel_ticks */ - const octet NRC_WHEEL_FRONT_LEFT = 0; - const octet NRC_WHEEL_FRONT_RIGHT = 1; - const octet NRC_WHEEL_REAR_LEFT = 2; - const octet NRC_WHEEL_REAR_RIGHT = 3; - - /** status values */ - const octet NRC_ENABLED_LONGITUDINAL_CONTROL = 0x01; - const octet NRC_ENABLED_LATERAL_CONTROL = 0x02; - const octet NRC_ENABLED_AUTONOMY = 0x03; - const octet NRC_ENABLED_BREAK_OVERRIDE = 0x04; - const octet NRC_ENABLED_ACC_OVERRIDE = 0x08; - const octet NRC_ENABLED_STEER_OVERRIDE = 0x10; - - typedef sequence DoubleSequence4; - - //@copy-c-declaration class NrcControllerStateSampleTypeSupport; - //@copy-c-declaration class NrcControllerStateSampleDataWriter; - //@copy-c-declaration class NrcControllerStateSampleDataReader; - //@copy-c-declaration struct NrcControllerStateSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcControllerStateSample - //@copy-declaration */ - valuetype NrcControllerStateSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcControllerStateSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcControllerStateSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcControllerStateSampleDataReader DataReader; - //@copy-c-declaration typedef NrcControllerStateSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcControllerStateSample Type; - - //@copy-c-declaration /** distance to the center of the next intersection in meters */ - public float distance; - - //@copy-c-declaration /** type is unknown when the car is inside an intersection - //@copy-c-declaration * more types may be added later - //@copy-c-declaration */ - public octet type; - - //@copy-c-declaration /** phase of light is undefined when type is unknown. - //@copy-c-declaration * always green for stop signs, stop lines, and yield signs. - //@copy-c-declaration */ - public octet phase; - - //@copy-c-declaration /** bitfield indicating status - //@copy-c-declaration * negative values (most significant bit set) indicate an error condition - //@copy-c-declaration * positive values are for other status information - //@copy-c-declaration * please document bit-field values - //@copy-c-declaration * 0x00000001 enabled longitudinal ctrl - //@copy-c-declaration * 0x00000002 enabled lateral ctrl - //@copy-c-declaration * 0x00000003 enabled autonomy - //@copy-c-declaration * 0x00000004 break override - //@copy-c-declaration * 0x00000008 acc override - //@copy-c-declaration * 0x00000010 steer override - //@copy-c-declaration */ - public octet status; - - //@copy /** error information, leave blank if everything is shiny */ - public String32 status_message; - - //@copy /** velocity in m/s */ - public double velocity; - - //@copy /** steering angle in radians */ - public double steering_angle; - - //@copy //** e.g., wheel_speeds[NRC_WHEEL_FRONT_LEFT] */ - public DoubleSequence4 wheel_speeds; - public DoubleSequence4 wheel_ticks; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcControllerStateSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl deleted file mode 100644 index 633b39d..0000000 --- a/knRapid/src/rapidExtArcDds/NrcDriveGoalSample.idl +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef rapid_ext_arc_NrcDriveGoalSample_idl -#define rapid_ext_arc_NrcDriveGoalSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - // departure_constraints - const octet NRC_STOP = 0; - const octet NRC_NO_STOP = 1; - - // drive_modes - const octet NRC_ON_THIS_ROAD = 0; // Remain on this road but drive in any lane. - const octet NRC_STRICT_IN_THIS_LANE = 1; // Remain in the specified line and allow only small deviation into other lanes. For example, to pass a parked car - const octet NRC_RELAXED_IN_THIS_LANE = 2; // May move into other lanes briefly but return to this lane as soon a practical - const octet NRC_COME_TO_THIS_POINT = 3; - - //@copy-declaration /** - //@copy-declaration * Direct copy of NRC ROS type. - //@copy-declaration * Provides the next position in-lane position that the vehicle will drive to. - //@copy-declaration */ - struct DriveGoal { - long lane_id; - - //@copy /** Note: known as variable s with the mission planner. */ - float longitudinal_position; - - Transform3D pose; - - //@copy /** The desired speed of the vehicle in the segment between the end of the prevoius drive goal and arriving at this goal */ - float approach_speed; - - //@copy /** Speed limit on road */ - float speed_limit; - - //@copy /** Departure Constraints */ - octet departure_constraints; - - //@copy /** Controls the freedom of the behavior recipient to change lanes etc. */ - octet drive_mode; - }; - - typedef sequence DriveGoalSequence64; - - //@copy-c-declaration class NrcDriveGoalSampleTypeSupport; - //@copy-c-declaration class NrcDriveGoalSampleDataWriter; - //@copy-c-declaration class NrcDriveGoalSampleDataReader; - //@copy-c-declaration struct NrcDriveGoalSampleSeq; - //@copy-declaration /** - //@copy-declaration * NrcDriveGoalWithLanesSample - //@copy-declaration */ - valuetype NrcDriveGoalSample : Message { - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcDriveGoalSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcDriveGoalSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcDriveGoalSampleDataReader DataReader; - //@copy-c-declaration typedef NrcDriveGoalSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcDriveGoalSample Type; - public DriveGoalSequence64 drive_goals; - }; - }; - }; -}; - - - -#endif // rapid_ext_arc_NrcDriveGoalSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl b/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl deleted file mode 100644 index 2e56eaa..0000000 --- a/knRapid/src/rapidExtArcDds/NrcDriveGoalWithLanesSample.idl +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" -#include "BaseTypes.idl" -#include "NrcDriveGoalSample.idl" -#include "NrcMapLaneSetSample.idl" - -module rapid { - module ext { - module arc { - - //@copy-c-declaration class NrcDriveGoalWithLanesSampleTypeSupport; - //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataWriter; - //@copy-c-declaration class NrcDriveGoalWithLanesSampleDataReader; - //@copy-c-declaration struct NrcDriveGoalWithLanesSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcDriveGoalWithLanesSample - //@copy-declaration */ - valuetype NrcDriveGoalWithLanesSample : Message { - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleDataReader DataReader; - //@copy-c-declaration typedef NrcDriveGoalWithLanesSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcDriveGoalWithLanesSample Type; - - public DriveGoalSequence64 drive_goals; - public MapLaneSequence8 map_lanes; - }; - - }; - }; -}; diff --git a/knRapid/src/rapidExtArcDds/NrcImageRegions.idl b/knRapid/src/rapidExtArcDds/NrcImageRegions.idl deleted file mode 100644 index 2b29b15..0000000 --- a/knRapid/src/rapidExtArcDds/NrcImageRegions.idl +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef rapid_ext_arc_NrcImageRegions_idl -#define rapid_ext_arc_NrcImageRegions_idl - -/* - * Copyright (c) 2016 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - const String32 IMGROI_CLASS_FACE = "face"; - const String32 IMGROI_CLASS_PEDESTRIAN = "pedestrian"; - const String32 IMGROI_CLASS_ROAD_SIGN = "road_sign"; - const String32 IMGROI_CLASS_STREET_SIGN = "street_sign"; - const String32 IMGROI_CLASS_TRAFFIC_LIGHT = "traffic_light"; - const String32 IMGROI_CLASS_USER_DEFINED = "user_defined"; - - //@copy-declaration /** - //@copy-declaration * Image region coordinates are given in range of 0..1 and - //@copy-declaration * must be scaled by image size to obtain pixel coordinates. - //@copy-declaration */ - struct ImageRegion { - //@copy-declaration /** upper left corner of region, range 0..1 */ - Vec2f xy; - //@copy-declaration /** size of region */ - Vec2f size; - //@copy-declaration /** unique identifier for region (tracking id) */ - long long regionId; - //@copy-declaration /** classification of region, e.g. pedestrian, sign, etc. */ - String32 classification; - //@copy-declaration /** json encoded string containing additional meta data (optional) */ - String128 meta; - }; - - typedef sequence ImageRegionSequence; - - //@copy-c-declaration class NrcImageRegionsTypeSupport; - //@copy-c-declaration class NrcImageRegionsDataWriter; - //@copy-c-declaration class NrcImageRegionsDataReader; - //@copy-c-declaration struct NrcImageRegionsSeq; - - //@copy-declaration /** - //@copy-declaration * NrcImageRegions - //@copy-declaration */ - valuetype NrcImageRegions : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcImageRegionsTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcImageRegionsDataWriter DataWriter; - //@copy-c-declaration typedef NrcImageRegionsDataReader DataReader; - //@copy-c-declaration typedef NrcImageRegionsSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcImageRegions Type; - - /** identifier of camera stream that these image regions are associated with */ - public String64 cameraId; - /** regions of interest */ - public ImageRegionSequence rois; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcImageRegions_idl diff --git a/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl b/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl deleted file mode 100644 index 7d3bd40..0000000 --- a/knRapid/src/rapidExtArcDds/NrcIntersectionSample.idl +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef rapid_ext_arc_NrcIntersectionSample_idl -#define rapid_ext_arc_NrcIntersectionSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - const octet INTERSECTION_TYPE_UNKNOWN = 0; - const octet INTERSECTION_TYPE_INTERSECTION = 117; - - const octet INTERSECTION_PHASE_UNDEFINED = 0; - const octet INTERSECTION_PHASE_GREEN_LIGHT = 93; - const octet INTERSECTION_PHASE_YELLOW_LIGHT = 94; - const octet INTERSECTION_PHASE_RED_LIGHT = 97; - - //@copy-c-declaration class NrcIntersectionSampleTypeSupport; - //@copy-c-declaration class NrcIntersectionSampleDataWriter; - //@copy-c-declaration class NrcIntersectionSampleDataReader; - //@copy-c-declaration struct NrcIntersectionSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcIntersectionSample - //@copy-declaration */ - valuetype NrcIntersectionSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcIntersectionSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcIntersectionSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcIntersectionSampleDataReader DataReader; - //@copy-c-declaration typedef NrcIntersectionSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcIntersectionSample Type; - - //@copy-c-declaration /** distance to the center of the next intersection in meters */ - public float distance; - - //@copy-c-declaration /** type is unknown when the car is inside an intersection - //@copy-c-declaration * more types may be added later - //@copy-c-declaration */ - public octet type; - - //@copy-c-declaration /** phase of light is undefined when type is unknown. - //@copy-c-declaration * always green for stop signs, stop lines, and yield signs. - //@copy-c-declaration */ - public octet phase; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcIntersectionSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl b/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl deleted file mode 100644 index b9993ba..0000000 --- a/knRapid/src/rapidExtArcDds/NrcInterventionRequest.idl +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef rapid_ext_arc_NrcInterventionRequest_idl -#define rapid_ext_arc_NrcInterventionRequest_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - enum Category { - CATEGORY_UNDEFINED, - CATEGORY_COLLISION, - CATEGORY_CONSTRUCTION_ZONE, - CATEGORY_ROAD_OBSTRUCTION, - CATEGORY_MECHANICAL_FAILURE, - CATEGORY_SENSOR_FAILURE, - CATEGORY_PLANNING_FAILURE, - CATEGORY_TRAFFIC_CONTROLLER - }; - typedef sequence CategorySequence; - - enum Severity { - SEVERITY_IGNORE, - SEVERITY_LOW, - SEVERITY_MEDIUM, - SEVERITY_HIGH - }; - - //@copy-c-declaration class NrcInterventionRequestTypeSupport; - //@copy-c-declaration class NrcInterventionRequestDataWriter; - //@copy-c-declaration class NrcInterventionRequestDataReader; - //@copy-c-declaration struct NrcInterventionRequestSeq; - - //@copy-declaration /** - //@copy-declaration * NrcInterventionRequest - //@copy-declaration */ - valuetype NrcInterventionRequest : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcInterventionRequestTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcInterventionRequestDataWriter DataWriter; - //@copy-c-declaration typedef NrcInterventionRequestDataReader DataReader; - //@copy-c-declaration typedef NrcInterventionRequestSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcInterventionRequest Type; - - /** - * Unique id for situation. Updates to same situation will use same requestId - */ - public long requestId; //@key - /** - * How urgently an intervention is required. Scale of 0-n (TBD) - */ - public long urgency; - /** - * Situation categories that led to intervention request. - * Each request should have at least one category. A situation - * may be a combination of categories, e.g. roadwork blocking - * the road with a flag person would be: - * CATEGORY_ROAD_OBSTRUCTION, CATEGORY_CONSTRUCTION_ZONE, CATEGORY_TRAFFIC_CONTROLLER - */ - public CategorySequence category; - /** - * Severity of situation, e.g. if category is COLLISION, - * SEVERITY_LOW would be tapping a garbage can - * SEVERITY_HIGH would be a freeway pileup - */ - public Severity severity; - /** - * Optional message to convey more information about the request. - * E.g. if category is CATEGORY_SENSOR_FAILURE, message could - * contain what sensor(s) failed - */ - public String128 message; - /** - * json encoded string with proposed solution (if any) - */ - public String2K solution; - - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcInterventionRequest_idl diff --git a/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl b/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl deleted file mode 100644 index d2e37c8..0000000 --- a/knRapid/src/rapidExtArcDds/NrcInterventionResponse.idl +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef rapid_ext_arc_NrcInterventionResponse_idl -#define rapid_ext_arc_NrcInterventionResponse_idl - -/* - * Copyright (c) 2016 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - enum ResponseType { - RESPONSE_TYPE_NOOP, - RESPONSE_TYPE_ACCEPTED, // teleoperator has accepted this request - RESPONSE_TYPE_REJECTED, // teleoperator has rejected this request - RESPONSE_TYPE_COMPLETED, // teleoperator has finished working on this request - RESPONSE_TYPE_ATTENDING, // teleoperator is working on a solution - RESPONSE_TYPE_SOLUTION, // teleoperator has sent an actionable solution - RESPONSE_TYPE_STATEMENT, // communication intended for vehicle occupant - RESPONSE_TYPE_NOTE // teleoperator note about this teleop zone and/or solution - }; - - //@copy-c-declaration class NrcInterventionResponseTypeSupport; - //@copy-c-declaration class NrcInterventionResponseDataWriter; - //@copy-c-declaration class NrcInterventionResponseDataReader; - //@copy-c-declaration struct NrcInterventionResponseSeq; - - //@copy-declaration /** - //@copy-declaration * NrcInterventionResponse - //@copy-declaration */ - valuetype NrcInterventionResponse : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcInterventionResponseTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcInterventionResponseDataWriter DataWriter; - //@copy-c-declaration typedef NrcInterventionResponseDataReader DataReader; - //@copy-c-declaration typedef NrcInterventionResponseSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcInterventionResponse Type; - - /** Unique id for situation originating from InterventionRequest */ - public long long requestId; - /** identifier of teleoperator console */ - public String32 operatorId; - - public ResponseType responseType; - public String2K responseData; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcInterventionResponse_idl diff --git a/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl b/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl deleted file mode 100644 index 32efdef..0000000 --- a/knRapid/src/rapidExtArcDds/NrcLanePlannerStateSample.idl +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef rapid_ext_arc_NrcLanePlannerStateSample_idl -#define rapid_ext_arc_NrcLanePlannerStateSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - /** planner_state values from LanePlannerState.msg */ - const octet NRC_PLANNER_IDLE = 0; - const octet NRC_PLANNER_ACTIVE = 1; - const octet NRC_PLANNER_SUBSTITUE_ROUTE = 2; - const octet NRC_PLANNER_LOST = 4; - const octet NRC_PLANNER_BLOCKED = 8; - const octet NRC_PLANNER_PREEMPTED = 16; - const octet NRC_PLANNER_NO_CONTROL = 32; - - //@copy-c-declaration class NrcLanePlannerStateSampleTypeSupport; - //@copy-c-declaration class NrcLanePlannerStateSampleDataWriter; - //@copy-c-declaration class NrcLanePlannerStateSampleDataReader; - //@copy-c-declaration struct NrcLanePlannerStateSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcLanePlannerStateSample - //@copy-declaration */ - valuetype NrcLanePlannerStateSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcLanePlannerStateSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcLanePlannerStateSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcLanePlannerStateSampleDataReader DataReader; - //@copy-c-declaration typedef NrcLanePlannerStateSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcLanePlannerStateSample Type; - - public octet status; - - public String32 status_message; - - public octet planner_state; - - // todo: - //public MapLanePose vehicle_pose; - //public DriveGoal[] planning_horizon_goals; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcLanePlannerStateSample_idl diff --git a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl b/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl deleted file mode 100644 index e425a8a..0000000 --- a/knRapid/src/rapidExtArcDds/NrcMapLaneSetSample.idl +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" -#include "BaseTypes.idl" - -module rapid { - module ext { - module arc { - - //@copy-declaration /** Direct copy of NRC ROS type NOTE: some members have been omitted because they are not used in practice */ - struct MapPoint { - float x; - float y; - //float z; - float theta; - - // height at the end of vector - //float z_end; - float length; - - // position at MapLine. Start is 0 - float s; - - // curvatures. If it's line, all curv_* is 0 - //float curv_start; - //float curv_mid; - //float curv_end; - }; - - typedef sequence MapPointSequence1K; - typedef sequence Vec2fSequence64; - - //@copy-declaration /** Direct copy of NRC ROS type */ - struct MapLine { - MapPointSequence1K map_points; - String32 type; - String32 road_mark_type; - }; - - //@copy-declaration /** Direct copy of NRC ROS type */ - struct MapLane { - long id; - MapLine lane_center; - MapLine left_boundary; - MapLine right_boundary; - MapLine left_outer_boundary; - MapLine right_outer_boundary; - - long left_sibling_id; - long right_sibling_id; - - // "s" : distance along path from 1st point. - FloatSequence64 stop_line_positions; - - // "s", max speed [m/s] - Vec2fSequence64 speed_along_path; - - // "s" value to start transition to next lane - // -1 means no transition - float transit_s; - }; - - typedef sequence MapLaneSequence8; - typedef sequence MapLaneSequence64; - - //@copy-c-declaration class NrcMapLaneSetSampleTypeSupport; - //@copy-c-declaration class NrcMapLaneSetSampleDataWriter; - //@copy-c-declaration class NrcMapLaneSetSampleDataReader; - //@copy-c-declaration struct NrcMapLaneSetSampleSeq; - - //@copy-declaration /** - //@copy-declaration * NrcMapLaneSetSample - //@copy-declaration */ - valuetype NrcMapLaneSetSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcMapLaneSetSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcMapLaneSetSampleDataWriter DataWriter; - //@copy-c-declaration typedef NrcMapLaneSetSampleDataReader DataReader; - //@copy-c-declaration typedef NrcMapLaneSetSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcMapLaneSetSample Type; - - public MapLaneSequence64 map_lanes; - }; - - }; - }; -}; - diff --git a/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl b/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl deleted file mode 100644 index 0757f89..0000000 --- a/knRapid/src/rapidExtArcDds/TrackedObjectConfig.idl +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef rapid_ext_arc_TrackedObjectConfig_idl -#define rapid_ext_arc_TrackedObjectConfig_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" - -/** - * \file - * - * \brief TrackedObjectConfig - * - * \ingroup idlfiles - */ -module rapid { - module ext { - module arc { - - //@copy-c-declaration class TrackedObjectConfigTypeSupport; - //@copy-c-declaration class TrackedObjectConfigDataWriter; - //@copy-c-declaration class TrackedObjectConfigDataReader; - //@copy-c-declaration struct TrackedObjectConfigSeq; - - //@copy-declaration /** TrackedObjectConfig */ - valuetype TrackedObjectConfig : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef TrackedObjectConfigTypeSupport TypeSupport; - //@copy-c-declaration typedef TrackedObjectConfigDataWriter DataWriter; - //@copy-c-declaration typedef TrackedObjectConfigDataReader DataReader; - //@copy-c-declaration typedef TrackedObjectConfigSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef TrackedObjectConfig Type; - - //@copy-declaration /** Specifies the interpretation of the rotation field in TrackedObjectSample.pose - //@copy-declaration * @see RotationEncoding */ - public RotationEncoding poseEncoding; - //@copy-declaration /** Specifies the interpretation of the rotation field in TrackedObjectSample.velocity - //@copy-declaration * @see RotationEncoding */ - public RotationEncoding velocityEncoding; - - //@copy-declaration /** Labels for possible classifications */ - public String16Sequence32 classifications; - - //@copy-declaration /** Holds extra Agent-specific information about object samples. */ - public KeyTypeValueSequence64 valueKeys; - }; - - const long TRACKEDOBJECT_BOUND_BOX = 0; - const long TRACKEDOBJECT_BOUND_CYLINDER = 1; - const long TRACKEDOBJECT_BOUND_SPHERE = 2; - - }; - }; -}; - -#endif // rapid_ext_arc_TrackedObjectConfig_idl diff --git a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl b/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl deleted file mode 100644 index 4567dc6..0000000 --- a/knRapid/src/rapidExtArcDds/TrackedObjectSample.idl +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef rapid_ext_arc_TrackedObjectSample_idl -#define rapid_ext_arc_TrackedObjectSample_idl - -/* - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All Rights Reserved. - */ - -#include "Message.idl" -#include "PointCloudSample.idl" -#include "Trajectory3D.idl" - -/** - * \file - * - * \brief TrackedObjectSample - * - * \ingroup idlfiles - */ -module rapid { - module ext { - module arc { - - typedef sequence Trajectory3DSequence16; - - //@copy-c-declaration class TrackedObjectSampleTypeSupport; - //@copy-c-declaration class TrackedObjectSampleDataWriter; - //@copy-c-declaration class TrackedObjectSampleDataReader; - //@copy-c-declaration struct TrackedObjectSampleSeq; - - //@copy-declaration /** - //@copy-declaration * TrackedObjectSample - //@copy-declaration */ - valuetype TrackedObjectSample : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef TrackedObjectSampleTypeSupport TypeSupport; - //@copy-c-declaration typedef TrackedObjectSampleDataWriter DataWriter; - //@copy-c-declaration typedef TrackedObjectSampleDataReader DataReader; - //@copy-c-declaration typedef TrackedObjectSampleSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef TrackedObjectSample Type; - - public long objectId; //@key - - //@copy /** reference frame - must be a valid FrameStore frame name*/ - public String32 refFrame; - //@copy-declaration /** 3D pose of the recognized object. TrackedObjectConfig.poseEncoding specifies how to interpret the rotation. */ - public Transform3D pose; - //@copy-declaration /** 3D velocity of the recognized object. TrackedObjectConfig.velocityEncoding specifies how to interpret the rotation. */ - public Transform3D velocity; - - public long boundShape; - //@copy-declaration /** Interpretation for params: - //@copy-declaration * TRACKEDOBJECT_BOUND_BOX: extents [0]=X [1]=Y [2]=Z - //@copy-declaration * TRACKEDOBJECT_BOUND_CYLINDER: [0]=Radius in xy [1]=height along z-axis - //@copy-declaration * TRACKEDOBJECT_BOUND_SPHERE: [0]=Radius - //@copy-declaration */ - public Vec3d boundParams; - - //@copy-declaration /** time tracking started */ - public long long trackingStart; - //@copy-declaration /** time object got current classification */ - public long long classificationStart; - public long classification; - - //@copy-declaration /** 3d points from sensed object */ - public Vec3d pointsScale; - public PointSampleSequence points; - - //@copy-declaration /** predicted trajectories */ - public Trajectory3DSequence16 predictedTrajectories; - - //@copy-declaration /** Any Agent-specific information needed. */ - public ValueSequence64 values; - - }; - }; - }; -}; - -#endif // rapid_ext_arc_TrackedObjectSample_idl diff --git a/knRapid/src/rapidExtArcIo/CMakeLists.txt b/knRapid/src/rapidExtArcIo/CMakeLists.txt index 35ad088..0b40e6c 100644 --- a/knRapid/src/rapidExtArcIo/CMakeLists.txt +++ b/knRapid/src/rapidExtArcIo/CMakeLists.txt @@ -28,8 +28,6 @@ set( HEADERS SpectrumProvider.h StateMachineIo.h StateMachineProvider.h - TrackedObjectIo.h - TrackedObjectProvider.h ) set( SOURCES @@ -49,8 +47,6 @@ set( SOURCES SpectrumProvider.cpp StateMachineIo.cpp StateMachineProvider.cpp - TrackedObjectIo.cpp - TrackedObjectProvider.cpp ) include_directories( @@ -102,12 +98,10 @@ set( TARGETS gpsPrinter hydraPrinter mobilitySamplePrinter - nrcMapLaneSetPrinter spectrumPrinter stateMachinePrinter systemInfoConfigPrinter systemInfoSamplePrinter - trackedObjectPrinter wheelGroupSamplePrinter ) diff --git a/knRapid/src/rapidExtArcIo/TrackedObjectIo.cpp b/knRapid/src/rapidExtArcIo/TrackedObjectIo.cpp deleted file mode 100644 index 3bea66c..0000000 --- a/knRapid/src/rapidExtArcIo/TrackedObjectIo.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "TrackedObjectIo.h" -#include "rapidIo/HeaderIo.h" -#include "rapidIo/BaseTypesIo.h" -#include "rapidExtArcDds/TrackedObjectConfig.h" -#include "RapidExtArcIoParameters.h" - -#include -#include - -// copied from PositionIo -namespace -{ - char const * rotationEncodingNames[] = { - "ROT_NONE", - "ROT_M33", - "ROT_QUAT", - "ROT_XYZ", - "ROT_ZYX", - "ROT_ZYZ", - "ROT_VEL" - }; - - rapid::RotationEncoding rotationEncodings[] = { - rapid::RAPID_ROT_NONE, - rapid::RAPID_ROT_M33, - rapid::RAPID_ROT_QUAT, - rapid::RAPID_ROT_XYZ, - rapid::RAPID_ROT_ZYX, - rapid::RAPID_ROT_ZYZ, - rapid::RAPID_ROT_VEL - }; - int const NUM_ROTATION_ENCODINGS = sizeof(rotationEncodings) / sizeof(rapid::RotationEncoding); - -} - -namespace rapid -{ - namespace ext - { - namespace arc - { - std::ostream& operator<< (std::ostream& ostr, TrackedObjectConfig const& rhs) - { - ostr << "TrackedObjectConfig: {" - << rhs.hdr << "," - << rotationEncodingNames[rhs.poseEncoding] << "," - << rotationEncodingNames[rhs.velocityEncoding] << "," - << rhs.valueKeys - << "}"; - - return ostr; - } - - void operator <<= (TrackedObjectConfig& config, TrackedObjectConfigParameters const& params) - { - config.hdr <<= params.hdr; - - config.poseEncoding = rotationEncodings[params.poseEncoding]; - config.velocityEncoding = rotationEncodings[params.velocityEncoding]; - - config.valueKeys <<= params.valueKeys; - } - } - } -} diff --git a/knRapid/src/rapidExtArcIo/TrackedObjectIo.h b/knRapid/src/rapidExtArcIo/TrackedObjectIo.h deleted file mode 100644 index b6e1cc9..0000000 --- a/knRapid/src/rapidExtArcIo/TrackedObjectIo.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef rapid_ext_arc_TrackedObjectIo_h -#define rapid_ext_arc_TrackedObjectIo_h - -#include "rapidExtArcIo_Export.h" -#include - -namespace rapid -{ - namespace ext - { - namespace arc - { - class TrackedObjectConfigParameters; - class TrackedObjectConfig; - - rapidExtArcIo_Export extern std::ostream& operator<< (std::ostream& ostr, TrackedObjectConfig const& rhs); - rapidExtArcIo_Export extern void operator <<= (TrackedObjectConfig& config, TrackedObjectConfigParameters const& params); - } - } -} - -#endif //rapid_ext_arc_TrackedObjectIo_h diff --git a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp b/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp deleted file mode 100644 index b0b7d64..0000000 --- a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- C++ -*- ***************************************************************** - * Copyright (c) 2015 United States Government as represented by the - * Administrator of the National Aeronautics and Space Administration. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -******************************************************************************/ -#include "TrackedObjectProvider.h" - -#include "rapidExtArcDds/ExtArcConstants.h" -#include "RapidExtArcIoParameters.h" - -namespace rapid -{ - namespace ext - { - namespace arc - { - TrackedObjectProvider::TrackedObjectProvider(TrackedObjectTopicPairParameters const& params, const std::string& entityName) - : - TrackedObjectProviderBase(TRACKEDOBJECT_CONFIG_TOPIC, - TRACKEDOBJECT_SAMPLE_TOPIC, - params, - entityName) - { - rapid::ext::arc::TrackedObjectConfig& config = m_configSupplier.event(); - config.poseEncoding = (rapid::RotationEncoding)params.config.poseEncoding; - config.velocityEncoding = (rapid::RotationEncoding)params.config.velocityEncoding; - // classifications - config.classifications.length(params.config.classifications.size()); - for(unsigned i = 0; i < params.config.classifications.size(); i++) { - strncpy(config.classifications[i], params.config.classifications[i].c_str(), 16); - config.classifications[i][15] = '\0'; - } - } - } - } -} diff --git a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.h b/knRapid/src/rapidExtArcIo/TrackedObjectProvider.h deleted file mode 100644 index fdbeef9..0000000 --- a/knRapid/src/rapidExtArcIo/TrackedObjectProvider.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef rapid_ext_arc_TrackedObjectProvider_h -#define rapid_ext_arc_TrackedObjectProvider_h - -#include "rapidUtil/Provider_T.h" - -#include "rapidExtArcDds/TrackedObjectConfig.h" -#include "rapidExtArcDds/TrackedObjectConfigSupport.h" -#include "rapidExtArcDds/TrackedObjectSample.h" -#include "rapidExtArcDds/TrackedObjectSampleSupport.h" - -#include "TrackedObjectIo.h" - -#include "rapidExtArcIo_Export.h" - -namespace rapid -{ - namespace ext - { - namespace arc - { - class TrackedObjectTopicPairParameters; - - typedef Provider_T TrackedObjectProviderBase; - - class rapidExtArcIo_Export TrackedObjectProvider : public TrackedObjectProviderBase - { - public: - TrackedObjectProvider(TrackedObjectTopicPairParameters const& params, const std::string& entityName); - }; - } - } -} - - -#endif //rapid_ext_arc_TrackedObjectProvider_h diff --git a/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp b/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp deleted file mode 100644 index 048b526..0000000 --- a/knRapid/src/rapidExtArcIo/nrcMapLaneSetPrinter.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "rapidUtil/GenericPrinter_T.h" - -#include "rapidExtArcDds/NrcMapLaneSetSample.h" -#include "rapidExtArcDds/NrcMapLaneSetSampleSupport.h" -#include "rapidExtArcDds/ExtArcConstants.h" - -#include - -using namespace rapid; -int main(int argc, char *argv[]) -{ - GenericPrinter_T printer(argc, argv, - "RapidSampleQos"); - printer.run(ext::arc::NRCMAPLANESET_SAMPLE_TOPIC); - return 0; -} diff --git a/knRapid/src/rapidExtArcIo/trackedObjectPrinter.cpp b/knRapid/src/rapidExtArcIo/trackedObjectPrinter.cpp deleted file mode 100644 index 461ba91..0000000 --- a/knRapid/src/rapidExtArcIo/trackedObjectPrinter.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "RapidExtArcIoParameters.h" -#include "TrackedObjectIo.h" - -#include "rapidUtil/TopicPairApp_T.h" -#include "rapidUtil/RapidHelper.h" - -#include "rapidExtArcDds/TrackedObjectConfig.h" -#include "rapidExtArcDds/TrackedObjectConfigSupport.h" -#include "rapidExtArcDds/TrackedObjectSample.h" -#include "rapidExtArcDds/TrackedObjectSampleSupport.h" -#include "rapidExtArcDds/ExtArcConstants.h" - -#include - -namespace rapid -{ - typedef TopicPairApp_T TopicPairApp; -} - - -using namespace rapid; -int main(int argc, char *argv[]) -{ - ext::arc::TrackedObjectTopicPairParameters params; - TopicPairApp app(argc, argv, params); - - app.run(ext::arc::TRACKEDOBJECT_CONFIG_TOPIC, ext::arc::TRACKEDOBJECT_SAMPLE_TOPIC); - return 0; -} From 530fcc168601b545b7be38309608ab93a33df5b2 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 25 Oct 2016 15:43:41 -0700 Subject: [PATCH 37/90] add _IDL_DIR variables to catkin extras.in files so downstream DDS IDL packages can findidls to include. Add /include to include_directories for all projects to avoid needing to source devel/setup.bash before building --- irgUtil/CMakeLists.txt | 7 ++++--- kn/CMakeLists.txt | 1 + knDds/CMakeLists.txt | 1 + knRapid/CMakeLists.txt | 1 + knRapid/cmake/knRapid-extras.cmake.develspace.in | 4 ++++ knRapid/cmake/knRapid-extras.cmake.installspace.in | 4 ++++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/irgUtil/CMakeLists.txt b/irgUtil/CMakeLists.txt index c98b0bc..10c7f8f 100644 --- a/irgUtil/CMakeLists.txt +++ b/irgUtil/CMakeLists.txt @@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 2.8.3) project(irgUtil) if (CATKIN_DEVEL_PREFIX) -find_package(catkin REQUIRED COMPONENTS - irg_cmake -) + find_package(catkin REQUIRED COMPONENTS + irg_cmake + ) + include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) if (catkin_FOUND) diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index 80d154d..0f72280 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -8,6 +8,7 @@ if (CATKIN_DEVEL_PREFIX) find_package(catkin REQUIRED COMPONENTS irg_cmake ) + include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) if (NOT catkin_FOUND) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 7111514..0aca68a 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -10,6 +10,7 @@ if (CATKIN_DEVEL_PREFIX) kn Miro ) + include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) if (NOT catkin_FOUND) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index c224ee1..921f8e6 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -12,6 +12,7 @@ if (CATKIN_DEVEL_PREFIX) kn knDds ) + include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) if (NOT catkin_FOUND) diff --git a/knRapid/cmake/knRapid-extras.cmake.develspace.in b/knRapid/cmake/knRapid-extras.cmake.develspace.in index 3f7d5ba..5eb3fb4 100644 --- a/knRapid/cmake/knRapid-extras.cmake.develspace.in +++ b/knRapid/cmake/knRapid-extras.cmake.develspace.in @@ -7,6 +7,10 @@ set(KNRAPID_INCLUDE_DIR @CATKIN_DEVEL_PREFIX@/include @CATKIN_DEVEL_PREFIX@/include/rapidExtDds @CATKIN_DEVEL_PREFIX@/include/rapidExtArcDds ) +set(KNRAPID_rapidDds_IDL_DIR @PROJECT_SOURCE_DIR@/src/rapidDds ) +set(KNRAPID_rapidExtDds_IDL_DIR @PROJECT_SOURCE_DIR@/src/rapidExtDds ) +set(KNRAPID_rapidExtArcDds_IDL_DIR @PROJECT_SOURCE_DIR@/src/rapidExtArcDds ) + ## add include dirs to catkin_INCLUDE_DIRS set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) diff --git a/knRapid/cmake/knRapid-extras.cmake.installspace.in b/knRapid/cmake/knRapid-extras.cmake.installspace.in index d9fa2b8..cdf07e0 100644 --- a/knRapid/cmake/knRapid-extras.cmake.installspace.in +++ b/knRapid/cmake/knRapid-extras.cmake.installspace.in @@ -7,6 +7,10 @@ set(KNRAPID_INCLUDE_DIR @CMAKE_INSTALL_PREFIX@/include @CMAKE_INSTALL_PREFIX@/include/rapidExtDds @CMAKE_INSTALL_PREFIX@/include/rapidExtArcDds ) +set(KNRAPID_rapidDds_IDL_DIR @CMAKE_INSTALL_PREFIX@/idl/rapidDds) +set(KNRAPID_rapidExtDds_IDL_DIR @CMAKE_INSTALL_PREFIX@/idl/rapidExtDds) +set(KNRAPID_rapidExtArcDds_IDL_DIR @CMAKE_INSTALL_PREFIX@/idl/rapidExtArcDds) + ## add include dirs to catkin_INCLUDE_DIRS set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNRAPID_INCLUDE_DIR} ) From 4ce86c730e385c11bcbe7c7c09acb9bf0666bcde Mon Sep 17 00:00:00 2001 From: mallanmba Date: Fri, 28 Oct 2016 10:45:42 -0700 Subject: [PATCH 38/90] odd, I git rm-ed NrcMapAnnotionsUpdate.idl already --- .../NrcMapAnnotationsUpdate.idl | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl diff --git a/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl b/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl deleted file mode 100644 index 731590a..0000000 --- a/knRapid/src/rapidExtArcDds/NrcMapAnnotationsUpdate.idl +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef rapid_ext_arc_NrcMapAnnotationsUpdate_idl -#define rapid_ext_arc_NrcMapAnnotationsUpdate_idl - -#include "Message.idl" - -module rapid { - module ext { - module arc { - - //@copy-c-declaration class NrcMapAnnotationsUpdateTypeSupport; - //@copy-c-declaration class NrcMapAnnotationsUpdateDataWriter; - //@copy-c-declaration class NrcMapAnnotationsUpdateDataReader; - //@copy-c-declaration struct NrcMapAnnotationsUpdateSeq; - - //@copy-declaration /** - //@copy-declaration * NrcMapAnnotationsUpdate - //@copy-declaration */ - valuetype NrcMapAnnotationsUpdate : Message { - - //@copy-c-declaration #if RTI_DDS_VERSION_MAJOR < 4 || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR < 5) || (RTI_DDS_VERSION_MAJOR == 4 && RTI_DDS_VERSION_MINOR == 5 && RTI_DDS_VERSION_RELEASE != 'f' ) - //@copy-c-declaration typedef NrcMapAnnotationsUpdateTypeSupport TypeSupport; - //@copy-c-declaration typedef NrcMapAnnotationsUpdateDataWriter DataWriter; - //@copy-c-declaration typedef NrcMapAnnotationsUpdateDataReader DataReader; - //@copy-c-declaration typedef NrcMapAnnotationsUpdateSeq Seq; - //@copy-c-declaration #endif - //@copy-c-declaration typedef NrcMapAnnotationsUpdate Type; - - /** - * Unique id for situation. Updates to same situation will use same requestId - */ - public long messageId; //@key - /** - * json encoded string with proposed solution (if any) - */ - public String2K updatedAnnotationFile; - }; - }; - }; -}; - -#endif // rapid_ext_arc_NrcMapAnnotationsUpdate_idl From 03ef7179e14de4f193ff02bb6b29452ffedc26d9 Mon Sep 17 00:00:00 2001 From: mallan Date: Thu, 17 Nov 2016 20:34:58 +0000 Subject: [PATCH 39/90] merge point cloud attributes and qos refactor from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10649 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/etc/RAPID_QOS_PROFILES.xml | 46 +++++++++++-------- knRapid/src/rapidDds/PointCloudConfig.idl | 8 +++- .../rapidExtArcDds/ExtArcCommandConstants.idl | 7 +++ knRapid/src/rapidIo/PointCloudIo.cpp | 6 ++- knRapid/src/rapidIo/PointCloudProvider.cpp | 2 + 5 files changed, 47 insertions(+), 22 deletions(-) diff --git a/knRapid/etc/RAPID_QOS_PROFILES.xml b/knRapid/etc/RAPID_QOS_PROFILES.xml index 8a1a30a..35bb69d 100644 --- a/knRapid/etc/RAPID_QOS_PROFILES.xml +++ b/knRapid/etc/RAPID_QOS_PROFILES.xml @@ -115,6 +115,14 @@ dds.transport.UDPv4.builtin.parent.deny_multicast_interfaces 10.10.1.*,10.30.10.*,192.168.3.255,169.254.194.2,192.168.1.*,192.9.202.1,192.168.5.*,192.168.10.*,192.168.122.* + @@ -127,6 +135,14 @@ 0 + + @@ -136,6 +152,13 @@ ASYNCHRONOUS_PUBLISH_MODE_QOS + @@ -236,6 +259,9 @@ + + + @@ -577,9 +603,7 @@ - - - + @@ -603,22 +627,6 @@ - - - - - - - - - - - - - - - - diff --git a/knRapid/src/rapidDds/PointCloudConfig.idl b/knRapid/src/rapidDds/PointCloudConfig.idl index 5ab5518..692c574 100644 --- a/knRapid/src/rapidDds/PointCloudConfig.idl +++ b/knRapid/src/rapidDds/PointCloudConfig.idl @@ -41,6 +41,10 @@ module rapid { //@copy-declaration *
  • PS_ECHO: echo # for multiple returns. unsigned byte (0-255) //@copy-declaration *
  • PS_LAYER4_ECHO4: first 4 bits are layer (0-15), second 4 bits are echo (0-15) //@copy-declaration *
  • PS_PULSE: pulse index. unsigned byte (0-255) + //@copy-declaration *
  • PS_RGB332: RGB packed into single byte + //@copy-declaration *
  • PS_RGB565: Assumes both attribute bytes are used for 16 bit color. + //@copy-declaration * 1st byte: upper 3 bits are first 3 bits of green, lower 5 bits are red + //@copy-declaration * 2nd byte: upper 3 bits are second 3 bits of green,h lower 5 bits are blue //@copy-declaration * //@copy-declaration */ enum PointSampleAttributeMode { @@ -49,7 +53,9 @@ module rapid { PS_LAYER, PS_ECHO, PS_LAYER4_ECHO4, - PS_PULSE + PS_PULSE, + PS_RGB332, + PS_RGB565 }; //@copy-c-declaration class PointCloudConfigTypeSupport; diff --git a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl index fd3cc0e..ec477a8 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl @@ -161,6 +161,13 @@ module rapid { const String32 ROSBRIDGE_METHOD_setMinSeparation_PARAM_msec = "msec"; // min separation between images in milliseconds const DataType ROSBRIDGE_METHOD_setMinSeparation_DTYPE_msec = RAPID_INT; + const String32 GIMBAL = "Gimbal"; + const String32 GIMBAL_METHOD_setPanTilt = "setPanTilt"; + const String32 GIMBAL_METHOD_setPanTilt_PARAM_pan = "pan"; + const DataType GIMBAL_METHOD_setPanTilt_DTYPE_pan = RAPID_FLOAT; + const String32 GIMBAL_METHOD_setPanTilt_PARAM_tilt = "tilt"; + const DataType GIMBAL_METHOD_setPanTilt_DTYPE_tilt = RAPID_FLOAT; + }; }; }; diff --git a/knRapid/src/rapidIo/PointCloudIo.cpp b/knRapid/src/rapidIo/PointCloudIo.cpp index 4cd9fc0..2b3ebee 100644 --- a/knRapid/src/rapidIo/PointCloudIo.cpp +++ b/knRapid/src/rapidIo/PointCloudIo.cpp @@ -46,12 +46,14 @@ namespace }; AttributeModePair const attributeModesMap[] = { - { rapid::PS_UNUSED, "PS_UNUSED" }, + { rapid::PS_UNUSED, "PS_UNUSED" }, { rapid::PS_INTENSITY, "PS_INTENSITY" }, { rapid::PS_LAYER, "PS_LAYER" }, { rapid::PS_ECHO, "PS_ECHO" }, { rapid::PS_LAYER4_ECHO4, "PS_LAYER4_ECHO4" }, - { rapid::PS_PULSE, "PS_PULSE" } + { rapid::PS_PULSE, "PS_PULSE" }, + { rapid::PS_RGB332, "PS_RGB332" }, + { rapid::PS_RGB565, "PS_RGB565" } }; unsigned int const NUM_ATTRIBUTE_MODES = sizeof(attributeModesMap) / sizeof(AttributeModePair); diff --git a/knRapid/src/rapidIo/PointCloudProvider.cpp b/knRapid/src/rapidIo/PointCloudProvider.cpp index 702b8c3..e3587e1 100644 --- a/knRapid/src/rapidIo/PointCloudProvider.cpp +++ b/knRapid/src/rapidIo/PointCloudProvider.cpp @@ -156,6 +156,7 @@ namespace rapid //! @TODO check on the different attribute formats and do something more smart than this sample.points[sampleIdx].attributes[0] = m_pc->points[m_pcIdx].att.int16s[0]; + sample.points[sampleIdx].attributes[1] = m_pc->points[m_pcIdx].att.int16s[1]; } } // publish with row-length markers @@ -191,6 +192,7 @@ namespace rapid //! @TODO check on the different attribute formats and do something more smart than this sample.points[sampleIdx].attributes[0] = m_pc->points[idx].att.int16s[0]; + sample.points[sampleIdx].attributes[1] = m_pc->points[idx].att.int16s[1]; } ++m_pcRowIndex; } From e61c1d97e1dc432985f5dcf556cd0f505932ee00 Mon Sep 17 00:00:00 2001 From: "Mark B. Allan" Date: Wed, 7 Dec 2016 15:44:48 -0800 Subject: [PATCH 40/90] Add catkin extras to set up the cmake INCLUDE_DIRS for downstream packages. This will allow us to move to catkin tools instead of having to use catkin_make --- kn/CMakeLists.txt | 1 + kn/cmake/kn-extras.cmake.develspace.in | 8 ++++++++ kn/cmake/kn-extras.cmake.installspace.in | 8 ++++++++ knDds/CMakeLists.txt | 1 + knDds/cmake/knDds-extras.cmake.develspace.in | 8 ++++++++ knDds/cmake/knDds-extras.cmake.installspace.in | 8 ++++++++ 6 files changed, 34 insertions(+) create mode 100644 kn/cmake/kn-extras.cmake.develspace.in create mode 100644 kn/cmake/kn-extras.cmake.installspace.in create mode 100644 knDds/cmake/knDds-extras.cmake.develspace.in create mode 100644 knDds/cmake/knDds-extras.cmake.installspace.in diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index 0f72280..cdc94af 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -46,6 +46,7 @@ if (catkin_FOUND) catkin_package( INCLUDE_DIRS src LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare + CFG_EXTRAS kn-extras.cmake DEPENDS ACE Boost EIGEN3 ) ## set variable with full path of extras file so we can append library info diff --git a/kn/cmake/kn-extras.cmake.develspace.in b/kn/cmake/kn-extras.cmake.develspace.in new file mode 100644 index 0000000..85542c8 --- /dev/null +++ b/kn/cmake/kn-extras.cmake.develspace.in @@ -0,0 +1,8 @@ +# source: kn-extras.cmake.develspace.in + +## Create INCLUDE_DIR variable for downstream packages +set(KN_INCLUDE_DIR @CATKIN_DEVEL_PREFIX@/include) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KN_INCLUDE_DIR} ) + diff --git a/kn/cmake/kn-extras.cmake.installspace.in b/kn/cmake/kn-extras.cmake.installspace.in new file mode 100644 index 0000000..52e98d1 --- /dev/null +++ b/kn/cmake/kn-extras.cmake.installspace.in @@ -0,0 +1,8 @@ +# source: kn-extras.cmake.installspace.in + +## Create INCLUDE_DIR variable for downstream packages +set(KN_INCLUDE_DIR @CMAKE_INSTALL_PREFIX@/include ) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KN_INCLUDE_DIR} ) + diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 0aca68a..7722585 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -77,6 +77,7 @@ if (catkin_FOUND) INCLUDE_DIRS src LIBRARIES knDds knDdsUtil CATKIN_DEPENDS kn Miro + CFG_EXTRAS knDds-extras.cmake DEPENDS RTIDDS ) ## set variable with full path of extras file so we can append library info diff --git a/knDds/cmake/knDds-extras.cmake.develspace.in b/knDds/cmake/knDds-extras.cmake.develspace.in new file mode 100644 index 0000000..f96df6a --- /dev/null +++ b/knDds/cmake/knDds-extras.cmake.develspace.in @@ -0,0 +1,8 @@ +# source: knDds-extras.cmake.develspace.in + +## Create INCLUDE_DIR variable for downstream packages +set(KNDDS_INCLUDE_DIR @CATKIN_DEVEL_PREFIX@/include) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNDDS_INCLUDE_DIR} ) + diff --git a/knDds/cmake/knDds-extras.cmake.installspace.in b/knDds/cmake/knDds-extras.cmake.installspace.in new file mode 100644 index 0000000..1baca03 --- /dev/null +++ b/knDds/cmake/knDds-extras.cmake.installspace.in @@ -0,0 +1,8 @@ +# source: knDds-extras.cmake.installspace.in + +## Create INCLUDE_DIR variable for downstream packages +set(KNDDS_INCLUDE_DIR @CMAKE_INSTALL_PREFIX@/include ) + +## add include dirs to catkin_INCLUDE_DIRS +set( catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} ${KNDDS_INCLUDE_DIR} ) + From 02e67e68357d18a4125e63b7444bd26ae40e2a47 Mon Sep 17 00:00:00 2001 From: mallan Date: Wed, 25 Jan 2017 00:48:25 +0000 Subject: [PATCH 41/90] add hasSubscribers() method to DdsTypedSupplier to quicky check if anyone is listening git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10653 71bd3d61-4118-0410-985d-8aea7a627388 --- knDds/src/knDds/DdsTypedSupplier.h | 19 ++++++++++++++++++- knDds/src/knDds/examples/rawWriter.cpp | 6 +++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/knDds/src/knDds/DdsTypedSupplier.h b/knDds/src/knDds/DdsTypedSupplier.h index 8584b51..c25607b 100644 --- a/knDds/src/knDds/DdsTypedSupplier.h +++ b/knDds/src/knDds/DdsTypedSupplier.h @@ -117,6 +117,7 @@ namespace kn virtual DataWriter& dataWriter() throw() { return dynamic_cast(*m_writer); } + bool hasSubscribers(); protected: /** hook to modify qos immediately before creation of DataWriter. Default implementation does nothing. */ @@ -140,6 +141,8 @@ namespace kn DDS::Topic * m_topic; Type * m_instance; + + DDS::InstanceHandleSeq m_subCheck; }; /** @@ -266,7 +269,9 @@ namespace kn if (m_instance == NULL) { throw("TypeSupport::create_data error"); } - + + // 0 max size InstanceHandleSeq used to check if we have subscribers + m_subCheck.loan_contiguous((DDS::InstanceHandle_t*)NULL, 0, 0); } /** @@ -318,6 +323,18 @@ namespace kn return *m_instance; } + /** + * fast check to see if there are any subscribers for this supplier's data + */ + template + bool + DdsTypedSupplier::hasSubscribers() + { + if(dataWriter().get_matched_subscriptions(m_subCheck) == DDS_RETCODE_OUT_OF_RESOURCES) + return true; + return false; + } + /** * publish passed-in data */ diff --git a/knDds/src/knDds/examples/rawWriter.cpp b/knDds/src/knDds/examples/rawWriter.cpp index 94669b0..9bd7bea 100644 --- a/knDds/src/knDds/examples/rawWriter.cpp +++ b/knDds/src/knDds/examples/rawWriter.cpp @@ -15,7 +15,7 @@ using namespace std; // 0020 00 01 e7 c2 1c f2 00 18 fe 2b 52 54 50 53 02 01 ........ .+RTPS.. // 0030 01 01 4e 44 44 53 50 49 4e 47 ..NDDSPI NG -char pingBuffer[] = { +unsigned char pingBuffer[] = { 0x52, 0x54, 0x50, 0x53, 0x02, 0x01, 0x01, 0x01, // RTPS 2.1 RTI 0x4e, 0x44, 0x44, 0x53, 0x50, 0x49, 0x4e, 0x47 // NDDSPING }; @@ -43,7 +43,7 @@ int const pingSize = sizeof(pingBuffer); // total packet size // [ENTITY] // RawWriter -char participantBuffer[] = { +unsigned char participantBuffer[] = { 0x52, 0x54, 0x50, 0x53, 0x02, 0x01, 0x01, 0x01, // RTPS 2.1 RTI 0xc1, 0x10, 0xb0, 0x9f, 0x00, 0x00, 0x3a, 0x02, 0x00, 0x00, 0x00, 0x01, // hostId(8) - IP, appId(12), counter(16) // info TS @@ -115,7 +115,7 @@ int const guidAppIdI = 68; // 00a0 00 00 00 00 00 00 ...... -char buffer[] = { +unsigned char buffer[] = { 0x52, 0x54, 0x50, 0x53, 0x02, 0x01, 0x01, 0x01, // RTPS 2.1 RTI 0xc1, 0x10, 0xb0, 0x9f, 0x00, 0x00, 0x3a, 0x02, 0x00, 0x00, 0x00, 0x01, // hostId(8) - IP, appId(12), counter(16) // info TS From 9846fa9214e96da792e32a226b45f20ea6ad805f Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 3 Feb 2017 19:32:40 +0000 Subject: [PATCH 42/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10654 71bd3d61-4118-0410-985d-8aea7a627388 From 8ab1f7b1cae626ec8dbf6cba070fe485a5a0a136 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 3 Feb 2017 19:32:42 +0000 Subject: [PATCH 43/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10655 71bd3d61-4118-0410-985d-8aea7a627388 --- kn/src/knGeometry/PointCloud.h | 4 ++++ kn/src/knMath/Vector.h | 36 +++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/kn/src/knGeometry/PointCloud.h b/kn/src/knGeometry/PointCloud.h index 4d85dd5..8b4d381 100644 --- a/kn/src/knGeometry/PointCloud.h +++ b/kn/src/knGeometry/PointCloud.h @@ -97,6 +97,10 @@ namespace kn void clear(); + inline void setTimestamp(const ACE_Time_Value& t) { + timestamp = t; + } + inline void setPointAttributeFormat(PointAttributeFormats format) { attFormat = format; } diff --git a/kn/src/knMath/Vector.h b/kn/src/knMath/Vector.h index bf6a513..452f884 100644 --- a/kn/src/knMath/Vector.h +++ b/kn/src/knMath/Vector.h @@ -31,45 +31,49 @@ namespace kn /** * @defgroup knMath Math * @brief The Math module of kn provides a set of typedef's and some helper classes to the Eigen math library. - * + * * The core idea behind this module is to down-select the vast set of capabilities of Eigen data-types, * to a number of "obviously preferred ones. */ - + /** @ingroup knMath */ typedef Eigen::Vector3d Vector3; /** @ingroup knMath */ + typedef Eigen::Vector3f Vector3f; + /** @ingroup knMath */ typedef Eigen::Vector2d Vector2; - typedef Eigen::VectorXd Vector; + typedef Eigen::VectorXd Vector; - typedef Eigen::Vector2i Vector2i; - typedef Eigen::Vector3i Vector3i; + typedef Eigen::Vector2i Vector2i; + typedef Eigen::Vector3i Vector3i; /** @ingroup knMath */ - typedef Eigen::VectorXd MathVectorDouble; + typedef Eigen::VectorXd MathVectorDouble; /** @ingroup knMath */ typedef std::vector > Vector2Vector; /** @ingroup knMath */ typedef std::vector > Vector3Vector; + /** @ingroup knMath */ + typedef std::vector > Vector3fVector; //Eigen 3.2+ defines .hasNaN() and .allFinite() (briefly called isFinite), but //until we're using at least that version everywhere, we need our own //To keep life simple, these are defined generically but will only compile //of course on Eigen types template - inline bool vectorHasNaN(const VecType &vec) - { - //cute parallel trick copied from Eigen source: NaN doesn't equal anything - return !((vec.array()==vec.array()).all()); - } + inline bool vectorHasNaN(const VecType &vec) + { + //cute parallel trick copied from Eigen source: NaN doesn't equal anything + return !((vec.array()==vec.array()).all()); + } template - inline bool vectorIsFinite(const VecType &vec) - { - //cute parallel trick copied from Eigen source: inf-inf = nan, nan-nan=nan - return !(vectorHasNaN(vec-vec)); - } + inline bool vectorIsFinite(const VecType &vec) + { + //cute parallel trick copied from Eigen source: inf-inf = nan, nan-nan=nan + return !(vectorHasNaN(vec-vec)); + } } From aa1848409649aaed25750ff9944d6aa033aee257 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 3 Feb 2017 19:32:44 +0000 Subject: [PATCH 44/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10656 71bd3d61-4118-0410-985d-8aea7a627388 From fb1d5fc75731287f4fa24b6cb673ac6bad8e749e Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 3 Feb 2017 19:32:46 +0000 Subject: [PATCH 45/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10657 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/rapidDds/PointCloudConfig.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knRapid/src/rapidDds/PointCloudConfig.idl b/knRapid/src/rapidDds/PointCloudConfig.idl index 692c574..6606596 100644 --- a/knRapid/src/rapidDds/PointCloudConfig.idl +++ b/knRapid/src/rapidDds/PointCloudConfig.idl @@ -44,7 +44,7 @@ module rapid { //@copy-declaration *
  • PS_RGB332: RGB packed into single byte //@copy-declaration *
  • PS_RGB565: Assumes both attribute bytes are used for 16 bit color. //@copy-declaration * 1st byte: upper 3 bits are first 3 bits of green, lower 5 bits are red - //@copy-declaration * 2nd byte: upper 3 bits are second 3 bits of green,h lower 5 bits are blue + //@copy-declaration * 2nd byte: upper 3 bits are second 3 bits of green, lower 5 bits are blue //@copy-declaration * //@copy-declaration */ enum PointSampleAttributeMode { From 7fee1dd0439a26884de908f5c684cc8dc2648058 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 7 Feb 2017 14:47:03 -0800 Subject: [PATCH 46/90] add directive to help isolated builds --- kn/CMakeLists.txt | 3 +++ knDds/CMakeLists.txt | 3 +++ knRapid/CMakeLists.txt | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index cdc94af..d7b87a7 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -51,6 +51,9 @@ if (catkin_FOUND) ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() + + # add devel/include - this should add to persistent catkin metadata + list(APPEND ${PROJECT_NAME}_INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include) endif( catkin_FOUND ) ## We must add the in-source and out-of-source diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 7722585..d7f664f 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -82,6 +82,9 @@ if (catkin_FOUND) ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() + + # add devel/include - this should add to persistent catkin metadata + list(APPEND ${PROJECT_NAME}_INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include) endif(catkin_FOUND) ## We must add the in-source and out-of-source diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 921f8e6..56c925e 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -75,7 +75,6 @@ if (catkin_FOUND) ################################### ## catkin specific configuration ## ################################### - catkin_package( INCLUDE_DIRS src # NOTE: see knRapid-extras.cmake for additional include dirs LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding @@ -84,6 +83,9 @@ if (catkin_FOUND) ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() + + # add devel/include - this should add to persistent catkin metadata + list(APPEND ${PROJECT_NAME}_INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include) endif(catkin_FOUND) From 01bb1982aa7323d1b9fb3a16ccfcbbb667d12b9a Mon Sep 17 00:00:00 2001 From: Morgan Quigley Date: Thu, 9 Feb 2017 14:37:38 -0800 Subject: [PATCH 47/90] remove unused initializer which was causing problems on Xenial --- kn/src/knMath/ATrans.cpp | 2 +- kn/src/knMotorShare/WheelGroupFuture.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kn/src/knMath/ATrans.cpp b/kn/src/knMath/ATrans.cpp index 742936d..280c85c 100644 --- a/kn/src/knMath/ATrans.cpp +++ b/kn/src/knMath/ATrans.cpp @@ -27,7 +27,7 @@ namespace kn std::ostream& operator<< (std::ostream& ostr, ATrans2Out const& rhs) { - Eigen::Rotation2Dd theta = 0.; + Eigen::Rotation2Dd theta; theta.fromRotationMatrix(rhs.transform().rotation()); ostr << "(" << rhs.transform().translation().x() << ", " << rhs.transform().translation().y() diff --git a/kn/src/knMotorShare/WheelGroupFuture.cpp b/kn/src/knMotorShare/WheelGroupFuture.cpp index 5062464..f86f926 100644 --- a/kn/src/knMotorShare/WheelGroupFuture.cpp +++ b/kn/src/knMotorShare/WheelGroupFuture.cpp @@ -25,7 +25,7 @@ namespace kn { std::ostream& operator<< (std::ostream& ostr, WheelGroupFuture const& rhs) { - Eigen::Rotation2Dd theta = 0.; + Eigen::Rotation2Dd theta; theta.fromRotationMatrix(rhs.offset.rotation()); ostr << "{"; ostr << static_cast(rhs); From a9c71aaac7f566ccb0be5df9695bbe80e00806a1 Mon Sep 17 00:00:00 2001 From: Morgan Quigley Date: Fri, 10 Feb 2017 09:37:49 -0800 Subject: [PATCH 48/90] use zero-initializer syntax compatible with Eigen versions in both Ubuntu 16.04 and 14.04. Also block some headers from MOC step so that Qt version in Ubuntu 16.04 doesn't fail with obscure Boost errors. --- kn/src/knMath/ATrans.cpp | 2 +- kn/src/knMotorShare/WheelGroupFuture.cpp | 2 +- .../src/rapidTools/genericCommandGui/CommandConfigSubscriber.h | 2 ++ .../imageSensorSampleGui/ImageSensorSampleSubscriber.h | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kn/src/knMath/ATrans.cpp b/kn/src/knMath/ATrans.cpp index 280c85c..680acd1 100644 --- a/kn/src/knMath/ATrans.cpp +++ b/kn/src/knMath/ATrans.cpp @@ -27,7 +27,7 @@ namespace kn std::ostream& operator<< (std::ostream& ostr, ATrans2Out const& rhs) { - Eigen::Rotation2Dd theta; + Eigen::Rotation2Dd theta(0.); theta.fromRotationMatrix(rhs.transform().rotation()); ostr << "(" << rhs.transform().translation().x() << ", " << rhs.transform().translation().y() diff --git a/kn/src/knMotorShare/WheelGroupFuture.cpp b/kn/src/knMotorShare/WheelGroupFuture.cpp index f86f926..1307af3 100644 --- a/kn/src/knMotorShare/WheelGroupFuture.cpp +++ b/kn/src/knMotorShare/WheelGroupFuture.cpp @@ -25,7 +25,7 @@ namespace kn { std::ostream& operator<< (std::ostream& ostr, WheelGroupFuture const& rhs) { - Eigen::Rotation2Dd theta; + Eigen::Rotation2Dd theta(0.); theta.fromRotationMatrix(rhs.offset.rotation()); ostr << "{"; ostr << static_cast(rhs); diff --git a/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h b/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h index 1c69dad..66c270d 100644 --- a/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h +++ b/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h @@ -21,7 +21,9 @@ #include +#ifndef Q_MOC_RUN #include "knDds/DdsTypedConnector.h" +#endif #include "rapidDds/CommandConfig.h" #include "rapidDds/CommandConfigSupport.h" diff --git a/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h b/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h index e1f3ed6..f39db39 100644 --- a/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h +++ b/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h @@ -19,7 +19,9 @@ #include #include +#ifndef Q_MOC_RUN #include "knDds/DdsTypedConnector.h" +#endif #include "rapidDds/ImageSensorSample.h" #include "rapidDds/ImageSensorSampleSupport.h" From a1828830b0df659d6a1c37698ca39089973e0d93 Mon Sep 17 00:00:00 2001 From: mallan Date: Mon, 10 Apr 2017 23:20:15 +0000 Subject: [PATCH 49/90] merge Ubuntu 16.04 fixes into soraCore git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10660 71bd3d61-4118-0410-985d-8aea7a627388 --- kn/src/knMath/ATrans.cpp | 2 +- kn/src/knMath/ATrans.h | 1 + kn/src/knMotorShare/WheelGroupFuture.cpp | 2 +- .../src/rapidTools/genericCommandGui/CommandConfigSubscriber.h | 2 ++ .../imageSensorSampleGui/ImageSensorSampleSubscriber.h | 2 ++ 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kn/src/knMath/ATrans.cpp b/kn/src/knMath/ATrans.cpp index 742936d..680acd1 100644 --- a/kn/src/knMath/ATrans.cpp +++ b/kn/src/knMath/ATrans.cpp @@ -27,7 +27,7 @@ namespace kn std::ostream& operator<< (std::ostream& ostr, ATrans2Out const& rhs) { - Eigen::Rotation2Dd theta = 0.; + Eigen::Rotation2Dd theta(0.); theta.fromRotationMatrix(rhs.transform().rotation()); ostr << "(" << rhs.transform().translation().x() << ", " << rhs.transform().translation().y() diff --git a/kn/src/knMath/ATrans.h b/kn/src/knMath/ATrans.h index f7ba06a..76a8334 100644 --- a/kn/src/knMath/ATrans.h +++ b/kn/src/knMath/ATrans.h @@ -23,6 +23,7 @@ #include #include +#include #include "knConfig.h" #include "knMath_Export.h" diff --git a/kn/src/knMotorShare/WheelGroupFuture.cpp b/kn/src/knMotorShare/WheelGroupFuture.cpp index 5062464..1307af3 100644 --- a/kn/src/knMotorShare/WheelGroupFuture.cpp +++ b/kn/src/knMotorShare/WheelGroupFuture.cpp @@ -25,7 +25,7 @@ namespace kn { std::ostream& operator<< (std::ostream& ostr, WheelGroupFuture const& rhs) { - Eigen::Rotation2Dd theta = 0.; + Eigen::Rotation2Dd theta(0.); theta.fromRotationMatrix(rhs.offset.rotation()); ostr << "{"; ostr << static_cast(rhs); diff --git a/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h b/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h index 1c69dad..66c270d 100644 --- a/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h +++ b/knRapid/src/rapidTools/genericCommandGui/CommandConfigSubscriber.h @@ -21,7 +21,9 @@ #include +#ifndef Q_MOC_RUN #include "knDds/DdsTypedConnector.h" +#endif #include "rapidDds/CommandConfig.h" #include "rapidDds/CommandConfigSupport.h" diff --git a/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h b/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h index e1f3ed6..f39db39 100644 --- a/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h +++ b/knRapid/src/rapidTools/imageSensorSampleGui/ImageSensorSampleSubscriber.h @@ -19,7 +19,9 @@ #include #include +#ifndef Q_MOC_RUN #include "knDds/DdsTypedConnector.h" +#endif #include "rapidDds/ImageSensorSample.h" #include "rapidDds/ImageSensorSampleSupport.h" From 4ecac05230bdfd35ba207f19f41ceaa82fa7adca Mon Sep 17 00:00:00 2001 From: mallan Date: Tue, 9 May 2017 22:08:32 +0000 Subject: [PATCH 50/90] increase NavMap layer size to 128K git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10662 71bd3d61-4118-0410-985d-8aea7a627388 --- knRapid/src/rapidExtDds/NavMapSample.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knRapid/src/rapidExtDds/NavMapSample.idl b/knRapid/src/rapidExtDds/NavMapSample.idl index 5980c52..787ab77 100644 --- a/knRapid/src/rapidExtDds/NavMapSample.idl +++ b/knRapid/src/rapidExtDds/NavMapSample.idl @@ -45,7 +45,7 @@ module rapid { short density; //@copy-declaration /** Vector of 8 bit data samples. */ - OctetSequence64K data; + OctetSequence128K data; }; //@copy-declaration /** @@ -72,7 +72,7 @@ module rapid { short density; //@copy-declaration /** Vector of 16 bit data samples. */ - ShortSequence64K data; + ShortSequence128K data; }; From 5f1d28c082b28c9d82638149caaa21302e87add5 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 12 May 2017 10:02:06 -0700 Subject: [PATCH 51/90] Another isnan std:: fix for KUbuntu 16.04 --- kn/src/knMath/ATrans.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kn/src/knMath/ATrans.h b/kn/src/knMath/ATrans.h index 76a8334..3b7082c 100644 --- a/kn/src/knMath/ATrans.h +++ b/kn/src/knMath/ATrans.h @@ -123,7 +123,7 @@ namespace kn ATrans2 step(ATrans2 const& pose, double curvature, double crab, double crabRate, double speed, double interval) { - if (isnan(curvature)) { + if (std::isnan(curvature)) { // Wheels are aligning, cannot calculate new pose return pose; } From 36161598d0c36f9cf063cfa752364ecfa8ad0e71 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 2 Aug 2017 08:01:31 -0700 Subject: [PATCH 52/90] Tweak DEPEND statement Kicking out Eigen from depend. Need to revisit this propperly --- kn/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index d7b87a7..65691ca 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -47,7 +47,7 @@ if (catkin_FOUND) INCLUDE_DIRS src LIBRARIES knShare knMath knGeometry knFrameStore knMotorShare CFG_EXTRAS kn-extras.cmake - DEPENDS ACE Boost EIGEN3 + DEPENDS ACE Boost ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() @@ -76,8 +76,9 @@ setup_ctest() # everything needs to include boost headers, so set it # up at the top level for convinience ##----------------------------------------------- -include_directories( +include_directories(SYSTEM ${Boost_INCLUDE_DIR} + ${EIGEN3_INCLUDE_DIRS} ) #----------------------------------- From 8995680d2712fdfd540b8b1a03d718a89d30685c Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 2 Aug 2017 08:02:31 -0700 Subject: [PATCH 53/90] Don't export libraries if not build --- knDds/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index d7f664f..63e8045 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -69,13 +69,17 @@ build_with_var( WITH_DDS_LBPlugin RTIDDS_LB_FOUND ) build_with_var( WITH_DDS_Monitor RTIDDS_MON_FOUND ) build_with_var( WITH_RTI_DistLogger RTIDDS_DLOGGER_FOUND ) +if (WITH_DDS) + set(knDDS_EXPORT_LIBRARIES knDds knDdsUtils) +endif (WITH_DDS) + if (catkin_FOUND) ################################### ## catkin specific configuration ## ################################### catkin_package( INCLUDE_DIRS src - LIBRARIES knDds knDdsUtil + LIBRARIES ${knDDS_EXPORT_LIBRARIES} CATKIN_DEPENDS kn Miro CFG_EXTRAS knDds-extras.cmake DEPENDS RTIDDS From 2ef209095ce5c5c9fcf5cf940fb6b0495438368b Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 2 Aug 2017 08:03:12 -0700 Subject: [PATCH 54/90] Don't export libraries when not build --- knRapid/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 56c925e..fd2eddc 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -71,13 +71,17 @@ find_package( Doxygen ) build_with_var( WITH_DDS RTIDDS_FOUND ) +if (WITH_DDS) + set(knRapid_EXPORT_LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding) +endif (WITH_DDS) + if (catkin_FOUND) ################################### ## catkin specific configuration ## ################################### catkin_package( INCLUDE_DIRS src # NOTE: see knRapid-extras.cmake for additional include dirs - LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding + LIBRARIES ${knRapid_EXPORT_LIBRARIES} CFG_EXTRAS knRapid-extras.cmake CATKIN_DEPENDS knDds ) From 0804d3df03312db72f4964b53d5a0c641d6fd862 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 2 Aug 2017 08:03:42 -0700 Subject: [PATCH 55/90] Don't build framstore w/o DDS There is some dependencies on parameters that first need to be clened up. --- knRapid/src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index 044b078..c2be641 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -12,8 +12,8 @@ add_build_switch( rapidExtIo KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( rapidExtArcIo KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( rapidExtTraclabsIo KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( rapidCommanding KNRAPID_HAS_DDS ) #AND NOT WIN32 ) # compile failure in ACE_NS_Thread.inl -add_build_switch( rapidFrameStore EIGEN3_FOUND) -add_build_switch( knFrameStoreSvc EIGEN3_FOUND ) +add_build_switch( rapidFrameStore KNRAPID_HAS_DDS AND EIGEN3_FOUND) +add_build_switch( knFrameStoreSvc KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) add_build_switch( knFetchPool QT_FOUND ) From 3f67876831a23da07b5af15846974f0ceb06c1be Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 4 Aug 2017 10:02:41 -0700 Subject: [PATCH 56/90] Minor cleanup on build switch --- knRapid/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index fd2eddc..c4a47ba 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -71,9 +71,9 @@ find_package( Doxygen ) build_with_var( WITH_DDS RTIDDS_FOUND ) -if (WITH_DDS) +if (RTIDDS_FOUND) set(knRapid_EXPORT_LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding) -endif (WITH_DDS) +endif (RTIDDS_FOUND) if (catkin_FOUND) ################################### @@ -100,8 +100,11 @@ endif(catkin_FOUND) include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src - ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} + ${CATKIN_DEVEL_PREFIX}/include +) +include_directories(SYSTEM + ${Boost_INCLUDE_DIR} ) ## Set up RPATH and *Config.h From 84bfb850562924253911b97df1db07483c7b6b1a Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 4 Aug 2017 10:03:26 -0700 Subject: [PATCH 57/90] Disable example for now There's some strange build problem with lib-dl symbols missing. Can't figure it out... --- knRapid/examples/dds/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knRapid/examples/dds/CMakeLists.txt b/knRapid/examples/dds/CMakeLists.txt index cdb5a15..3014a70 100644 --- a/knRapid/examples/dds/CMakeLists.txt +++ b/knRapid/examples/dds/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory( HelloWorld ) +#add_subdirectory( HelloWorld ) From f96aeea0eaf10f953d8cbbd4f867dee260313b7e Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 4 Aug 2017 10:04:09 -0700 Subject: [PATCH 58/90] Fix warning when build w/o DDS --- knDds/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 63e8045..c11fbab 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -69,9 +69,11 @@ build_with_var( WITH_DDS_LBPlugin RTIDDS_LB_FOUND ) build_with_var( WITH_DDS_Monitor RTIDDS_MON_FOUND ) build_with_var( WITH_RTI_DistLogger RTIDDS_DLOGGER_FOUND ) -if (WITH_DDS) - set(knDDS_EXPORT_LIBRARIES knDds knDdsUtils) -endif (WITH_DDS) +if (RTIDDS_FOUND) + set(knDDS_EXPORT_LIBRARIES knDds knDdsUtil) +endif (RTIDDS_FOUND) + +message("knDDS_EXPORT_LIBRARIES ${knDDS_EXPORT_LIBRARIES}") if (catkin_FOUND) ################################### @@ -82,7 +84,7 @@ if (catkin_FOUND) LIBRARIES ${knDDS_EXPORT_LIBRARIES} CATKIN_DEPENDS kn Miro CFG_EXTRAS knDds-extras.cmake - DEPENDS RTIDDS + DEPENDS ) ## set variable with full path of extras file so we can append library info set_cfg_extras_file() @@ -101,9 +103,11 @@ include_directories( include_directories( ${KN_INCLUDE_DIR} - ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${Boost_INCLUDE_DIR} +) if( WIN32 ) link_directories( ${Boost_LIBRARY_DIRS} ) From 888961c51c2122cc0656878e48b1cc69691868ea Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Tue, 10 Oct 2017 08:32:45 -0700 Subject: [PATCH 59/90] Export systemInfo library --- knRapid/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index c4a47ba..6931f30 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -71,8 +71,9 @@ find_package( Doxygen ) build_with_var( WITH_DDS RTIDDS_FOUND ) +set(knRapid_EXPORT_LIBRARIES knSystemInfo) #knFetchPool if (RTIDDS_FOUND) - set(knRapid_EXPORT_LIBRARIES rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding) + set(knRapid_EXPORT_LIBRARIES ${knRapid_EXPORT_LIBRARIES} rapidDds rapidIo rapidExtDds rapidExtIo rapidExtArcDds rapidExtArcIo rapidCommanding) endif (RTIDDS_FOUND) if (catkin_FOUND) From 04e0913154f3a5b46854dd2fa313cf3fa8a7639e Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Tue, 10 Oct 2017 08:39:10 -0700 Subject: [PATCH 60/90] Add some auto-configuration to sys monitors * Report all file systems (if none given) * Report all CPU's (if none given) * Improve CPU parsing (single pass) * Store parameter copies instead of const& (ownership) --- knRapid/src/knSystemInfo/CpuInfo.cpp | 133 +++++++++++--------- knRapid/src/knSystemInfo/CpuInfo.h | 13 +- knRapid/src/knSystemInfo/FilesystemInfo.cpp | 36 +++++- knRapid/src/knSystemInfo/FilesystemInfo.h | 11 +- knRapid/src/knSystemInfo/MemoryInfo.cpp | 7 +- knRapid/src/knSystemInfo/MemoryInfo.h | 7 +- knRapid/src/knSystemInfo/NetTrafficInfo.h | 11 +- 7 files changed, 136 insertions(+), 82 deletions(-) diff --git a/knRapid/src/knSystemInfo/CpuInfo.cpp b/knRapid/src/knSystemInfo/CpuInfo.cpp index f425977..f335a98 100644 --- a/knRapid/src/knSystemInfo/CpuInfo.cpp +++ b/knRapid/src/knSystemInfo/CpuInfo.cpp @@ -23,6 +23,7 @@ #include #include +#include namespace kn { @@ -32,87 +33,99 @@ namespace kn m_params(params), m_lastCpuInfo(params.numCpus) { + if (m_params.numCpus == 0) { + m_params.numCpus = numCpus(); + m_lastCpuInfo.resize(m_params.numCpus); + } + + + } - - int - CpuInfo::getCpu(Data& cpu, unsigned int index) + + int + CpuInfo::sampleInfo(DataVector& cpus) { + cpus.resize(m_params.numCpus); + const char* proc = m_params.proc.c_str(); + char foundCPU[64]; int rc = -1; ifstream is(proc); if (is.is_open()) { - char buffer[BUFFER_SIZE]; - memset(buffer, 0, BUFFER_SIZE); - char foundCPU[10]; - memset(foundCPU, 0, 10); - - int r = 0; - stringstream name; - name << "cpu" << index; - const char* expectCPU = name.str().c_str(); - - while ( !is.eof() ) { - is.getline(buffer, BUFFER_SIZE); + string line; + + for (size_t i = 0; i < m_params.numCpus; ++i) { + if (is.eof()) { + break; + } + std::getline(is, line); - // found the cpu we are looking for - if (strncmp(buffer, expectCPU, 4) == 0) { - Data cpuInfo; - r = sscanf(buffer, "%s %u %u %u %u\n", - foundCPU, - &cpuInfo.user, - &cpuInfo.nice, - &cpuInfo.system, - &cpuInfo.idle); - + if (line.substr(0, 3) != "cpu") { + break; + } + + Data cpuInfo; + int r = sscanf(line.c_str(), "%s %u %u %u %u\n", + foundCPU, + &cpuInfo.user, + &cpuInfo.nice, + &cpuInfo.system, + &cpuInfo.idle); - if ( r == 5 ) { - cpuInfo.busy = - cpuInfo.user + - cpuInfo.system + - cpuInfo.nice; - - float dSum = ( (cpuInfo.busy - m_lastCpuInfo[index].busy) + - (cpuInfo.idle - m_lastCpuInfo[index].idle) ); - - cpu.user = (unsigned int)((float)(cpuInfo.user - m_lastCpuInfo[index].user) / dSum * 10000); - cpu.nice = (unsigned int)((float)(cpuInfo.nice - m_lastCpuInfo[index].nice) / dSum * 10000); - cpu.system = (unsigned int)((float)(cpuInfo.system - m_lastCpuInfo[index].system) / dSum * 10000); - cpu.idle = (unsigned int)((float)(cpuInfo.idle - m_lastCpuInfo[index].idle) / dSum * 10000); - cpu.busy = (unsigned int)((float)(cpuInfo.busy - m_lastCpuInfo[index].busy) / dSum * 10000); + if ( r == 5 ) { + cpuInfo.busy = + cpuInfo.user + + cpuInfo.system + + cpuInfo.nice; - m_lastCpuInfo[index] = cpuInfo; + float dSum = ( (cpuInfo.busy - m_lastCpuInfo[i].busy) + + (cpuInfo.idle - m_lastCpuInfo[i].idle) ); - rc = 0; - } - else { - MIRO_LOG_OSTR(LL_ERROR, "Error parsing cpu info for: " << expectCPU); - } - break; + cpus[i].name = foundCPU; + cpus[i].user = (unsigned int)((float)(cpuInfo.user - m_lastCpuInfo[i].user) / dSum * 10000); + cpus[i].nice = (unsigned int)((float)(cpuInfo.nice - m_lastCpuInfo[i].nice) / dSum * 10000); + cpus[i].system = (unsigned int)((float)(cpuInfo.system - m_lastCpuInfo[i].system) / dSum * 10000); + cpus[i].idle = (unsigned int)((float)(cpuInfo.idle - m_lastCpuInfo[i].idle) / dSum * 10000); + cpus[i].busy = (unsigned int)((float)(cpuInfo.busy - m_lastCpuInfo[i].busy) / dSum * 10000); + + m_lastCpuInfo[i] = cpuInfo; + + rc = 0; + } + else { + MIRO_LOG_OSTR(LL_ERROR, "Error parsing cpu info for: " << i); } } - - if (strncmp(buffer, expectCPU, 4) != 0) - MIRO_LOG_OSTR(LL_WARNING, expectCPU << " not found!"); } else MIRO_LOG_OSTR(LL_ERROR,"Cannot read " << proc << ": " << strerror(errno)); return rc; } - - int - CpuInfo::sampleInfo(DataVector& cpus) + + int CpuInfo::numCpus() { - int rc = 0; + int cnt = 0; + const char* proc = m_params.proc.c_str(); - cpus.resize(m_params.numCpus); - for (unsigned int i = 0; i < m_params.numCpus; ++i) { - int rc = getCpu(cpus[i], i); - if (rc != 0) - break; + ifstream is(proc); + if (is.is_open()) { + + string line; + while (!is.eof()) { + if (!getline(is, line)) { + break; + } + + if (line.substr(0, 3) != "cpu") { + break; + } + ++cnt; + } } - return rc; - } + return cnt; + } + } diff --git a/knRapid/src/knSystemInfo/CpuInfo.h b/knRapid/src/knSystemInfo/CpuInfo.h index 6375be5..9f6f5c3 100644 --- a/knRapid/src/knSystemInfo/CpuInfo.h +++ b/knRapid/src/knSystemInfo/CpuInfo.h @@ -20,20 +20,20 @@ #define kn_BatteryInfo_h #include "knSystemInfo_Export.h" +#include "knSystemInfo/SystemInfoParameters.h" #include namespace kn { - class CpuParameters; - class CpuInfoParameters; - /** Publishes system information: laptop battery, ram/cpu/net usage, ect. to an event channel */ class knSystemInfo_Export CpuInfo { public: struct Data { + std::string name; + unsigned int user; unsigned int nice; unsigned int system; @@ -45,11 +45,14 @@ namespace kn CpuInfo(CpuInfoParameters const& params); int sampleInfo(DataVector& cpus); + unsigned int numCpus() const { + return m_params.numCpus; + } private: - int getCpu(Data& cpu, unsigned int index); + int numCpus(); - CpuInfoParameters const& m_params; + CpuInfoParameters m_params; DataVector m_lastCpuInfo; static int const BUFFER_SIZE = 256; diff --git a/knRapid/src/knSystemInfo/FilesystemInfo.cpp b/knRapid/src/knSystemInfo/FilesystemInfo.cpp index 332a1ae..1691f79 100644 --- a/knRapid/src/knSystemInfo/FilesystemInfo.cpp +++ b/knRapid/src/knSystemInfo/FilesystemInfo.cpp @@ -23,14 +23,20 @@ #include +#include + namespace kn { using namespace std; FilesystemInfo::FilesystemInfo(FilesystemInfoParameters const& params) : - m_params(params), - m_lastFilesystemInfo(params.volumes.size()) - {} + m_params(params) + { + if (params.volumes.empty()) { + m_params.volumes = this->collectFileSystems(); + + } + } int @@ -68,4 +74,28 @@ namespace kn } return rc; } + + std::vector FilesystemInfo::collectFileSystems() + { + vector volumes; + + std::ifstream is("/proc/mounts"); + string line; + while (is.good() && ! is.eof()) { + std::getline(is, line); + if (line.substr(0, 5) != "/dev/") { + continue; + } + + FilesystemParameters volume; + stringstream sstr(line); + sstr >> volume.name; + sstr >> volume.path; + + volumes.push_back(volume); + } + + return volumes; + } + } diff --git a/knRapid/src/knSystemInfo/FilesystemInfo.h b/knRapid/src/knSystemInfo/FilesystemInfo.h index b896bb8..2054644 100644 --- a/knRapid/src/knSystemInfo/FilesystemInfo.h +++ b/knRapid/src/knSystemInfo/FilesystemInfo.h @@ -20,14 +20,12 @@ #define kn_FilesystemInfo_h #include "knSystemInfo_Export.h" +#include "knSystemInfo/SystemInfoParameters.h" #include namespace kn { - class FilesystemParameters; - class FilesystemInfoParameters; - /** Publishes system information: laptop battery, ram/cpu/net usage, ect. to an event channel */ class knSystemInfo_Export FilesystemInfo { @@ -43,12 +41,15 @@ namespace kn FilesystemInfo(FilesystemInfoParameters const& params); int sampleInfo(DataVector& ifs); + FilesystemInfoParameters const& params() const { + return m_params; + } private: int getFilesystem(Data& info, unsigned int index); + std::vector< FilesystemParameters > collectFileSystems(); - FilesystemInfoParameters const& m_params; - DataVector m_lastFilesystemInfo; + FilesystemInfoParameters m_params; static const int BUFFER_SIZE = 256; }; diff --git a/knRapid/src/knSystemInfo/MemoryInfo.cpp b/knRapid/src/knSystemInfo/MemoryInfo.cpp index c8e109c..9ac0ac0 100644 --- a/knRapid/src/knSystemInfo/MemoryInfo.cpp +++ b/knRapid/src/knSystemInfo/MemoryInfo.cpp @@ -17,7 +17,6 @@ ******************************************************************************/ #include "MemoryInfo.h" -#include "SystemInfoParameters.h" #include "miro/Log.h" @@ -60,6 +59,12 @@ namespace kn int i = sscanf(buffer, "MemFree: %u kB\n", &memory.free); if (i != 1) { MIRO_LOG(LL_ERROR, "Error parsing MemFree."); + } + } + else if (!strncmp(buffer, "MemAvailable:", 8)) { + int i = sscanf(buffer, "MemAvailable: %u kB\n", &memory.available); + if (i != 1) { + MIRO_LOG(LL_ERROR, "Error parsing MemAvailable."); rc = -1; } } diff --git a/knRapid/src/knSystemInfo/MemoryInfo.h b/knRapid/src/knSystemInfo/MemoryInfo.h index 37619b8..c6fd0e7 100644 --- a/knRapid/src/knSystemInfo/MemoryInfo.h +++ b/knRapid/src/knSystemInfo/MemoryInfo.h @@ -20,11 +20,11 @@ #define kn_MemoryInfo_h #include "knSystemInfo_Export.h" +#include "knSystemInfo/SystemInfoParameters.h" + namespace kn { - class MemoryInfoParameters; - /** Publishes system information: laptop battery, ram/cpu/net usage, ect. to an event channel */ class knSystemInfo_Export MemoryInfo { @@ -34,6 +34,7 @@ namespace kn unsigned int cached; unsigned int buffers; unsigned int free; + unsigned int available; unsigned int swap; }; @@ -43,7 +44,7 @@ namespace kn int sampleInfo(Data& memory); private: - MemoryInfoParameters const& m_params; + MemoryInfoParameters m_params; unsigned int m_total; static const int BUFFER_SIZE = 256; diff --git a/knRapid/src/knSystemInfo/NetTrafficInfo.h b/knRapid/src/knSystemInfo/NetTrafficInfo.h index c170c20..6050749 100644 --- a/knRapid/src/knSystemInfo/NetTrafficInfo.h +++ b/knRapid/src/knSystemInfo/NetTrafficInfo.h @@ -20,14 +20,12 @@ #define kn_NetTrafficInfo_h #include "knSystemInfo_Export.h" +#include "knSystemInfo/SystemInfoParameters.h" #include namespace kn { - class NetTrafficParameters; - class NetTrafficInfoParameters; - /** Publishes system information: laptop battery, ram/cpu/net usage, ect. to an event channel */ class knSystemInfo_Export NetTrafficInfo { @@ -39,16 +37,19 @@ namespace kn unsigned int txErrors; unsigned int rxErrors; }; - typedef std::vector DataVector; + typedef std::vector DataVector; NetTrafficInfo(NetTrafficInfoParameters const& params); int sampleInfo(DataVector& ifs); + NetTrafficInfoParameters const& params() const { + return m_params; + } private: int getNetTraffic(Data& interface, unsigned int index); - NetTrafficInfoParameters const& m_params; + NetTrafficInfoParameters m_params; DataVector m_lastNetTrafficInfo; static const int BUFFER_SIZE = 256; From 82909744f96a1ab75cd3b0bf023961c749f85354 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Mon, 13 Nov 2017 10:21:23 -0800 Subject: [PATCH 61/90] Improve file-system info parsing --- knRapid/src/knSystemInfo/FilesystemInfo.cpp | 19 ++++++++++++++----- knRapid/src/knSystemInfo/FilesystemInfo.h | 4 +++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/knRapid/src/knSystemInfo/FilesystemInfo.cpp b/knRapid/src/knSystemInfo/FilesystemInfo.cpp index 1691f79..9874fd3 100644 --- a/knRapid/src/knSystemInfo/FilesystemInfo.cpp +++ b/knRapid/src/knSystemInfo/FilesystemInfo.cpp @@ -32,10 +32,12 @@ namespace kn FilesystemInfo::FilesystemInfo(FilesystemInfoParameters const& params) : m_params(params) { - if (params.volumes.empty()) { - m_params.volumes = this->collectFileSystems(); - + StringVector volumes; + volumes.reserve(params.volumes.size()); + for (size_t i = 0; i < m_params.volumes.size(); ++i) { + volumes.push_back(m_params.volumes[i].name); } + m_params.volumes = this->collectFileSystems(volumes); } @@ -75,8 +77,13 @@ namespace kn return rc; } - std::vector FilesystemInfo::collectFileSystems() + std::vector FilesystemInfo::collectFileSystems(StringVector const& volumeNames) { + StringVector names(volumeNames); + sort(names.begin(), names.end()); + StringVector::iterator iter = unique(names.begin(), names.end()); + names.erase(iter, names.end()); + vector volumes; std::ifstream is("/proc/mounts"); @@ -92,7 +99,9 @@ namespace kn sstr >> volume.name; sstr >> volume.path; - volumes.push_back(volume); + if (names.empty() || binary_search(names.begin(), names.end(), volume.name)) { + volumes.push_back(volume); + } } return volumes; diff --git a/knRapid/src/knSystemInfo/FilesystemInfo.h b/knRapid/src/knSystemInfo/FilesystemInfo.h index 2054644..74702b5 100644 --- a/knRapid/src/knSystemInfo/FilesystemInfo.h +++ b/knRapid/src/knSystemInfo/FilesystemInfo.h @@ -23,6 +23,7 @@ #include "knSystemInfo/SystemInfoParameters.h" #include +#include namespace kn { @@ -37,6 +38,7 @@ namespace kn unsigned long long available; }; typedef std::vector DataVector; + typedef std::vector StringVector; FilesystemInfo(FilesystemInfoParameters const& params); @@ -47,7 +49,7 @@ namespace kn private: int getFilesystem(Data& info, unsigned int index); - std::vector< FilesystemParameters > collectFileSystems(); + std::vector< FilesystemParameters > collectFileSystems(const std::vector< std::string >& volumeNames); FilesystemInfoParameters m_params; From b7e5d6cabf523a382ea8513dc0a0dc2d0cf2c93d Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 1 Mar 2018 16:11:58 -0800 Subject: [PATCH 62/90] Fix 16.06 build --- knDds/CMakeLists.txt | 19 +++++++- knRapid/CMakeLists.txt | 19 +++++++- knRapid/src/CMakeLists.txt | 2 +- knRapid/src/rapidIo/CMakeLists.txt | 78 +++++++++++++++--------------- 4 files changed, 77 insertions(+), 41 deletions(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index c11fbab..93f729f 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -51,8 +51,25 @@ endif( CMAKE_COMPILER_IS_GNUCXX ) add_build_var( WITH_DDS NOT APPLE ) find_package( RtiDds ) +if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ") + message(STATUS "FOUND QT 5") + find_package(Qt5Widgets REQUIRED) + find_package(Qt5Xml REQUIRED) + if (Qt5_POSITION_INDEPENDENT_CODE) + SET(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + include_directories(SYSTEM "${Qt5Widgets_INCLUDE_DIRS}") + include_directories(SYSTEM "${Qt5Xml_INCLUDE_DIRS}") +else() + message(STATUS "FOUND QT 4") + find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) + include(${QT_USE_FILE}) + include_directories(SYSTEM "${QT_INCLUDE_DIR}") + include_directories(SYSTEM "${QT_QTXML_INCLUDE_DIR}") + include_directories(SYSTEM "${QT_QTCORE_INCLUDE_DIR}") +endif() + find_package( ACE ) -find_package( Qt4 ) find_package( PThreads-win32 ) find_package( Boost 1.50.0 COMPONENTS program_options filesystem system chrono) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 6931f30..9101a72 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -59,8 +59,25 @@ endif (NOT catkin_FOUND) add_build_var( WITH_DDS NOT APPLE ) find_package( RtiDds ) +if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ") + message(STATUS "FOUND QT 5") + find_package(Qt5Widgets REQUIRED) + find_package(Qt5Xml REQUIRED) + if (Qt5_POSITION_INDEPENDENT_CODE) + SET(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + include_directories(SYSTEM "${Qt5Widgets_INCLUDE_DIRS}") + include_directories(SYSTEM "${Qt5Xml_INCLUDE_DIRS}") +else() + message(STATUS "FOUND QT 4") + find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) + include(${QT_USE_FILE}) + include_directories(SYSTEM "${QT_INCLUDE_DIR}") + include_directories(SYSTEM "${QT_QTXML_INCLUDE_DIR}") + include_directories(SYSTEM "${QT_QTCORE_INCLUDE_DIR}") +endif() + find_package( ACE ) -find_package( Qt4 ) find_package( PThreads-win32 ) find_package( CURL ) diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index c2be641..67f6e71 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -16,7 +16,7 @@ add_build_switch( rapidFrameStore KNRAPID_HAS_DDS AND EIGEN3_FOUND) add_build_switch( knFrameStoreSvc KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) -add_build_switch( knFetchPool QT_FOUND ) +#add_build_switch( knFetchPool QT_FOUND ) add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding AND IRGUTIL_irgSha1_LIBRARY AND KNRAPID_BUILD_knFetchPool ) add_build_switch( knProcessManager KNRAPID_HAS_DDS AND UNIX ) diff --git a/knRapid/src/rapidIo/CMakeLists.txt b/knRapid/src/rapidIo/CMakeLists.txt index 2bc13bb..2dfe278 100644 --- a/knRapid/src/rapidIo/CMakeLists.txt +++ b/knRapid/src/rapidIo/CMakeLists.txt @@ -85,44 +85,46 @@ add_srcdir_definitions(${RTIDDS_DEFINES} RTIDDS_FOUND ) # rapid printers #============================= -link_libraries( - ${LIB_NAME} -) - -set( TARGETS - accessControlStatePrinter - ackPrinter - agentPrinter - commandPrinter -# commandAckPrinter - commandConfigPrinter - fileAnnouncePrinter - fileQueueConfigPrinter - fileQueueEntryStatePrinter - fileQueueReceiverEntryStatePrinter - fileQueueReceiverSamplePrinter - fileQueueSamplePrinter - fileQueueStatePrinter - frameStoreConfigPrinter - macroConfigPrinter - macroStatePrinter - positionCovPrinter - positionPrinter - pointCloudPrinter - queueStatePrinter - jointPrinter - imageSensorSamplePrinter - textMessageClient - textMessagePrinter -) +install_library( ${LIB_NAME} ) +install_files ( /include/${DIR_NAME} FILES ${HEADERS} ) -foreach( TARGET ${TARGETS} ) - add_executable( ${TARGET} - ${TARGET}.cpp +if ( KNRAPID_HAS_DDS ) + set( TARGETS + accessControlStatePrinter + ackPrinter + agentPrinter + commandPrinter +# commandAckPrinter + commandConfigPrinter + fileAnnouncePrinter + fileQueueConfigPrinter + fileQueueEntryStatePrinter + fileQueueReceiverEntryStatePrinter + fileQueueReceiverSamplePrinter + fileQueueSamplePrinter + fileQueueStatePrinter + frameStoreConfigPrinter + macroConfigPrinter + macroStatePrinter + positionCovPrinter + positionPrinter + pointCloudPrinter + queueStatePrinter + jointPrinter + imageSensorSamplePrinter + textMessageClient + textMessagePrinter ) -endforeach( TARGET ${TARGETS} ) -target_link_libraries( fileQueueEntryStatePrinter ${Boost_PROGRAM_OPTIONS_LIBRARY}) -install_library( ${LIB_NAME} ) -install_files ( /include/${DIR_NAME} FILES ${HEADERS} ) -install_targets( /bin ${TARGETS} ) + foreach( TARGET ${TARGETS} ) + add_executable( ${TARGET} + ${TARGET}.cpp + ) + target_link_libraries(${TARGET} + ${LIB_NAME} + ) + endforeach( TARGET ${TARGETS} ) + target_link_libraries( fileQueueEntryStatePrinter ${Boost_PROGRAM_OPTIONS_LIBRARY}) + + install_targets( /bin ${TARGETS} ) +endif() From eeeeb0e45bcfcfdc0b9616e62c875e38aba992db Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Mon, 5 Mar 2018 14:58:56 -0800 Subject: [PATCH 63/90] Add missing libraries --- knRapid/CMakeLists.txt | 2 ++ knRapid/src/knSystemInfo/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 9101a72..aa5f626 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -68,6 +68,8 @@ if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ") endif() include_directories(SYSTEM "${Qt5Widgets_INCLUDE_DIRS}") include_directories(SYSTEM "${Qt5Xml_INCLUDE_DIRS}") + set(QT_QTXML_LIBRARY Qt5::Xml) + set(QT_QTCORE_LIBRARY Qt5::Widgets) else() message(STATUS "FOUND QT 4") find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) diff --git a/knRapid/src/knSystemInfo/CMakeLists.txt b/knRapid/src/knSystemInfo/CMakeLists.txt index bd8ccaf..c2c5034 100644 --- a/knRapid/src/knSystemInfo/CMakeLists.txt +++ b/knRapid/src/knSystemInfo/CMakeLists.txt @@ -55,6 +55,8 @@ add_definitions(-D${EXPORT_DEFINE}) link_libraries( ${MIRO_miroXml_LIBRARY} ${KN_knShare_LIBRARY} + ${QT_QTXML_LIBRARY} + ${QT_QTCORE_LIBRARY} ) add_library(${LIB_NAME} SHARED From 288f26a23fd6dad9d5235b9bae2bfc232b593ed2 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 14 Mar 2018 09:42:15 -0700 Subject: [PATCH 64/90] Remove duplicate find-opencv scripts --- cmake/Modules/FindOpenCV-irg.cmake | 76 ------- cmake/Modules/FindOpenCV-useConfig.cmake | 103 --------- cmake/Modules/FindOpenCV-willow.cmake | 265 ----------------------- cmake/Modules/FindOpenCV.cmake | 65 ------ 4 files changed, 509 deletions(-) delete mode 100644 cmake/Modules/FindOpenCV-irg.cmake delete mode 100644 cmake/Modules/FindOpenCV-useConfig.cmake delete mode 100644 cmake/Modules/FindOpenCV-willow.cmake delete mode 100644 cmake/Modules/FindOpenCV.cmake diff --git a/cmake/Modules/FindOpenCV-irg.cmake b/cmake/Modules/FindOpenCV-irg.cmake deleted file mode 100644 index bc268fc..0000000 --- a/cmake/Modules/FindOpenCV-irg.cmake +++ /dev/null @@ -1,76 +0,0 @@ -###################################################################### -# Find script for OpenCV -# -# The FindOpenCV script provided by Willow Garage follows Boost -# convention for variable names, (i.e. MyProject_VARIABLE) not -# the CMake variable convention (i.e. MYPROJECT_VARIABLE) -# We create variables in their form for compatibility -# -# Output Variables: -# ----------------- -# OpenCV_FOUND : TRUE if search succeded -# OpenCV_INCLUDE_DIR : include path -# OpenCV_LIBRARIES : libraries in one variable (use this in your CMakeLists) -# OpenCV_LIBRARY_DIR : library path -# OPENCV_opencv_LIBRARY : full path to cv -# -###################################################################### - -include( SimplePackageFind ) - -set( PACKAGE_NAME OpenCV ) -set( PACKAGE_DIRS opencv ) -set( PACKAGE_REQ_LIBRARY opencv_core ) -set( PACKAGE_REQ_INCLUDE opencv2/opencv.hpp ) - -simple_package_find("${PACKAGE_NAME}" - "${PACKAGE_DIRS}" - "${PACKAGE_REQ_LIBRARY}" - "${PACKAGE_REQ_INCLUDE}" -) - -## -## find paths to package libraries -## -################################################ -if( ${PACKAGE_FOUND} ) - - set( LIBRARY_NAMES - opencv_calib3d - opencv_contrib - opencv_core - opencv_features2d - opencv_flann - opencv_gpu - opencv_highgui - opencv_imgproc - opencv_legacy - opencv_ml - opencv_objdetect - opencv_ts - opencv_video - ) - get_library_list(OPENCV ${OPENCV_LIBRARY_DIR} "d" "${LIBRARY_NAMES}") - - ## Compatibility variables - set( OpenCV_FOUND ${OPENCV_FOUND} ) - set( OpenCV_INCLUDE_DIR ${OPENCV_INCLUDE_DIR} ) - set( OpenCV_LIBRARIES ${OPENCV_LIBRARIES} ) - set( OpenCV_LIBRARY_DIR ${OPENCV_LIBRARY_DIR} ) - set( OPENCV_LIB_COMPONENTS ${LIBRARY_NAMES} ) - set( OpenCV_DIR ${OPENCV_ROOT_DIR} ) - - #Find OpenCV version - find_file( OPENCV_VERSION_H opencv2/core/version.hpp PATHS ${OpenCV_INCLUDE_DIR} NO_DEFAULT_PATH) - if(OPENCV_VERSION_H) - file(STRINGS ${OPENCV_VERSION_H} OpenCV_VERSIONS_TMP REGEX "^#define CV_[A-Z]+_VERSION[ \t]+[0-9]+$") - string(REGEX REPLACE ".*#define CV_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MAJOR ${OpenCV_VERSIONS_TMP}) - string(REGEX REPLACE ".*#define CV_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MINOR ${OpenCV_VERSIONS_TMP}) - string(REGEX REPLACE ".*#define CV_SUBMINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_PATCH ${OpenCV_VERSIONS_TMP}) - set(OpenCV_VERSION ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH} CACHE STRING "" FORCE) - else(OPENCV_VERSION_H) - message( SEND_ERROR " Could not find OpenCV version header") - endif(OPENCV_VERSION_H) - -endif( ${PACKAGE_FOUND} ) - diff --git a/cmake/Modules/FindOpenCV-useConfig.cmake b/cmake/Modules/FindOpenCV-useConfig.cmake deleted file mode 100644 index 472fdef..0000000 --- a/cmake/Modules/FindOpenCV-useConfig.cmake +++ /dev/null @@ -1,103 +0,0 @@ -# this is a chopped-down version of the FindOpenCV.cmake script from -# WillowGarage. Modifying that script became too convoluted, so -# we keep things simple and throw out the old stuff - -if(EXISTS "${OpenCVConfig_FILE}") - include("${OpenCVConfig_FILE}") - - if(WIN32) - # sigh. OpenCV_INSTALL_PATH is invalid on windows, - # so derive OpenCV_DIR from OpenCV_LIB_DIR - # XXX This will fail if OpenCV_LIB_DIR has more than one entry - string( REGEX REPLACE "/[^/]*$" "" OpenCV_DIR ${OpenCV_LIB_DIR} ) - else(WIN32) - set( OpenCV_DIR ${OpenCV_INSTALL_PATH} ) - endif(WIN32) - - ## Awesome. OpenCVConfig.cmake has changed yet again and - ## no longer has the OpenCV_LIB_DIR variable (at least on - ## Ubuntu 14.04) So lets try and guess what it is, shall we? - if( NOT OpenCV_LIB_DIR ) - if(CMAKE_VERSION VERSION_GREATER 2.8.4) - include(GNUInstallDirs) - else(CMAKE_VERSION VERSION_GREATER 2.8.4) - # if we're using an ancient cmake, just fake it - set(CMAKE_INSTALL_LIBDIR lib) - endif(CMAKE_VERSION VERSION_GREATER 2.8.4) - find_library( OPENCV_CORE_LIB opencv_core - HINTS ${OpenCV_INSTALL_PATH}/lib - ${OpenCV_INSTALL_PATH}/${CMAKE_INSTALL_LIBDIR} - NO_DEFAULT_PATH ) - string(REGEX REPLACE "/[^/]*$" "" OpenCV_LIB_DIR ${OPENCV_CORE_LIB}) - unset(OPENCV_CORE_LIB CACHE) - endif( NOT OpenCV_LIB_DIR ) - - ## print out the important variables to help debug if things go wrong - message( STATUS " OpenCV_INSTALL_PATH=${OpenCV_INSTALL_PATH}") - message( STATUS " OpenCV_LIB_DIR=${OpenCV_LIB_DIR}") - - ## Search for a specific version - set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") - - if(NOT OPENCV_LIB_COMPONENTS) - set(OPENCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS}) - endif(NOT OPENCV_LIB_COMPONENTS) - -else(EXISTS "${OpenCVConfig_FILE}") - - message( SEND_ERROR " OpenCVConfig_FILE is '${OpenCVConfig_FILE}'. This script should only be called if OpenCVConfig_FILE exists." ) - -endif(EXISTS "${OpenCVConfig_FILE}") - -set(OpenCV_LIBS "") -set(OpenCV_FOUND_TMP true) -## Loop over each component to determine full path -foreach(__CVLIB ${OPENCV_LIB_COMPONENTS}) - - find_library(OpenCV_${__CVLIB}_LIBRARY_DEBUG - NAMES "${__CVLIB}${CVLIB_SUFFIX}d" "lib${__CVLIB}${CVLIB_SUFFIX}d" "${__CVLIB}d" - PATHS ${OpenCV_LIB_DIR} - NO_DEFAULT_PATH) - find_library(OpenCV_${__CVLIB}_LIBRARY_RELEASE - NAMES "${__CVLIB}${CVLIB_SUFFIX}" "lib${__CVLIB}${CVLIB_SUFFIX}" "${__CVLIB}" - PATHS ${OpenCV_LIB_DIR} - NO_DEFAULT_PATH) - - # clear the cache value - set(OpenCV_${__CVLIB}_LIBRARY "" CACHE STRING "" FORCE) - - if(OpenCV_${__CVLIB}_LIBRARY_DEBUG AND OpenCV_${__CVLIB}_LIBRARY_RELEASE) - set(OpenCV_${__CVLIB}_LIBRARY debug ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} optimized ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) - elseif(OpenCV_${__CVLIB}_LIBRARY_DEBUG) - set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} CACHE STRING "" FORCE) - elseif(OpenCV_${__CVLIB}_LIBRARY_RELEASE) - set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) - else() - message(STATUS " OpenCV_${__CVLIB}_LIBRARY not found." ) - message(STATUS " OpenCV_LIB_DIR=${OpenCV_LIB_DIR} " ) - message(STATUS " __CVLIB=${__CVLIB} " ) - set(OpenCV_FOUND_TMP false) - endif() - - #Add to the general list - if(OpenCV_${__CVLIB}_LIBRARY) - set(OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_${__CVLIB}_LIBRARY}) - endif(OpenCV_${__CVLIB}_LIBRARY) - -endforeach(__CVLIB) - -set( OpenCV_FOUND ${OpenCV_FOUND_TMP} CACHE BOOL "" FORCE ) -set( OpenCV_LIBRARIES "${OpenCV_LIBS}" ) - -##==================================================== -if(NOT OpenCV_FOUND) - # make FIND_PACKAGE friendly - if(NOT OpenCV_FIND_QUIETLY) - if(OpenCV_FIND_REQUIRED) - message(FATAL_ERROR "OpenCV required but some headers or libs not found. ${ERR_MSG}") - else(OpenCV_FIND_REQUIRED) - message(STATUS "WARNING: OpenCV was not found. ${ERR_MSG}") - endif(OpenCV_FIND_REQUIRED) - endif(NOT OpenCV_FIND_QUIETLY) -endif(NOT OpenCV_FOUND) -##==================================================== diff --git a/cmake/Modules/FindOpenCV-willow.cmake b/cmake/Modules/FindOpenCV-willow.cmake deleted file mode 100644 index 3ee2537..0000000 --- a/cmake/Modules/FindOpenCV-willow.cmake +++ /dev/null @@ -1,265 +0,0 @@ -########################################################### -# Find OpenCV Library -# See http://sourceforge.net/projects/opencvlibrary/ -#---------------------------------------------------------- -# -## 1: Setup: -# The following variables are optionally searched for defaults -# OpenCV_DIR: Base directory of OpenCv tree to use. -# -## 2: Variable -# The following are set after configuration is done: -# -# OpenCV_FOUND -# OpenCV_LIBS -# OpenCV_INCLUDE_DIR -# OpenCV_VERSION (OpenCV_VERSION_MAJOR, OpenCV_VERSION_MINOR, OpenCV_VERSION_PATCH) -# -# -# Deprecated variable are used to maintain backward compatibility with -# the script of Jan Woetzel (2006/09): www.mip.informatik.uni-kiel.de/~jw -# OpenCV_INCLUDE_DIRS -# OpenCV_LIBRARIES -# OpenCV_LINK_DIRECTORIES -# -## 3: Version -# -# 2013/12/11 Mark Allan, add search for opencv2 include directory and warn about include path -# 2010/10/19 Mark Allan, remove conditional around 'backwards comatibility' because those variables are conventional -# 2010/09/15 Mark Allan, Improve find behavior for rpm installs of OpenCV -# 2010/04/07 Benoit Rat, Correct a bug when OpenCVConfig.cmake is not found. -# 2010/03/24 Benoit Rat, Add compatibility for when OpenCVConfig.cmake is not found. -# 2010/03/22 Benoit Rat, Creation of the script. -# -# -# tested with: -# - OpenCV 2.1: MinGW, MSVC2008 -# - OpenCV 2.0: MinGW, MSVC2008, GCC4 -# -# -## 4: Licence: -# -# LGPL 2.1 : GNU Lesser General Public License Usage -# Alternatively, this file may be used under the terms of the GNU Lesser - -# General Public License version 2.1 as published by the Free Software -# Foundation and appearing in the file LICENSE.LGPL included in the -# packaging of this file. Please review the following information to -# ensure the GNU Lesser General Public License version 2.1 requirements -# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -# -#---------------------------------------------------------- -cmake_minimum_required(VERSION 2.6.3) # 'unset' command was added in version 2.6.3 - -find_path(OpenCV_DIR "OpenCVConfig.cmake" DOC "Root directory of OpenCV") - -#message(STATUS " (dbg) OpenCVConfig_FILE = ${OpenCVConfig_FILE}") -# OpenCVConfig may not be in root dir, so look for -# in in a few other places -find_file(OpenCVConfig_FILE "OpenCVConfig.cmake" - PATHS ${OpenCV_DIR} - ${OpenCV_DIR}/share/opencv - /usr/share/opencv - /usr/local/share/opencv - /opt/local/share/opencv - /opt/local/lib/cmake - DOC "Full path of OpenCVConfig.cmake" - NO_DEFAULT_PATH) -#message(STATUS " (dbg) OpenCVConfig_FILE = ${OpenCVConfig_FILE}") - -# if OpenCV_DIR is not set but OpenCVConfig.cmake was found, try to -# find cv.h and use it to set OpenCV_DIR -if(NOT OpenCV_DIR AND EXISTS ${OpenCVConfig_FILE}) - # places to look for cv.h - string( REGEX REPLACE "/[^/]*/[^/]*/[^/]*$" "" TMP_OPENCV_ROOT_1 ${OpenCVConfig_FILE} ) - string( REGEX REPLACE "/[^/]*/[^/]*/[^/]*/[^/]*$" "" TMP_OPENCV_ROOT_2 ${OpenCVConfig_FILE} ) - string( REGEX REPLACE "/[^/]*$" "" TMP_OPENCV_ROOT_3 ${OpenCVConfig_FILE} ) - - find_file(TMP_OPENCV_CV_H_FILE "cv.h" - PATHS "${TMP_OPENCV_ROOT_1}" "${TMP_OPENCV_ROOT_2}" "${TMP_OPENCV_ROOT_3}" - PATH_SUFFIXES "include/opencv" - DOC "tmp" - NO_DEFAULT_PATH ) - - # mallan: cv.h is a deprecated header. Look for new version... - if( NOT EXISTS ${TMP_OPENCV_CV_H_FILE} ) - set( HAVE_OLD_OPENCV_HEADERS FALSE ) - find_file(TMP_OPENCV_CV_H_FILE "opencv.hpp" - PATHS "${TMP_OPENCV_ROOT_1}" "${TMP_OPENCV_ROOT_2}" "${TMP_OPENCV_ROOT_3}" - PATH_SUFFIXES "include/opencv2" - DOC "tmp" - NO_DEFAULT_PATH ) - else( NOT EXISTS ${TMP_OPENCV_CV_H_FILE} ) - set( HAVE_OLD_OPENCV_HEADERS TRUE ) - endif( NOT EXISTS ${TMP_OPENCV_CV_H_FILE} ) - - if( EXISTS ${TMP_OPENCV_CV_H_FILE} ) - # remove include/opencv/cv.h and set root dir - string ( REGEX REPLACE "/[^/]*/[^/]*/[^/]*$" "" TMP_OPENCV_ROOT ${TMP_OPENCV_CV_H_FILE} ) - set( OpenCV_DIR ${TMP_OPENCV_ROOT} CACHE PATH "Root directory of OpenCV" FORCE ) - endif( EXISTS ${TMP_OPENCV_CV_H_FILE} ) - unset( TMP_OPENCV_CV_H_FILE CACHE ) - unset( TMP_OPENCV_ROOT_1 ) - unset( TMP_OPENCV_ROOT_2 ) -endif(NOT OpenCV_DIR AND EXISTS ${OpenCVConfig_FILE}) - -##==================================================== -## Find OpenCV libraries -##---------------------------------------------------- -if(EXISTS "${OpenCV_DIR}") - - #When its possible to use the Config script use it. - if(EXISTS "${OpenCVConfig_FILE}") - - ## Include the standard CMake script - include("${OpenCVConfig_FILE}") - ## Search for a specific version - set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") - - ## Changes to OpenCVConfig.cmake in 2.3 cause some headaches, - ## so try to add some backwards compatibility - #message(STATUS " debug: OPENCV_LIB_COMPONENTS=${OPENCV_LIB_COMPONENTS}") - #message(STATUS " debug: OpenCV_LIB_COMPONENTS=${OpenCV_LIB_COMPONENTS}") - if(NOT OPENCV_LIB_COMPONENTS) - set(OPENCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS}) - endif(NOT OPENCV_LIB_COMPONENTS) - #message(STATUS " debug: OPENCV_LIB_COMPONENTS=${OPENCV_LIB_COMPONENTS}") - - #Otherwise it try to guess it. - else(EXISTS "${OpenCVConfig_FILE}") - - ## FIXME this probably no longer works for 2.3+ - find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "") - if(EXISTS ${OpenCV_INCLUDE_DIR}) - include_directories(${OpenCV_INCLUDE_DIR}) - endif(EXISTS ${OpenCV_INCLUDE_DIR}) - - ## FIXME this probably no longer works for 2.3+ - ## Find OpenCV version by looking at cvver.h - file(STRINGS ${OpenCV_INCLUDE_DIR}/cvver.h OpenCV_VERSIONS_TMP REGEX "^#define CV_[A-Z]+_VERSION[ \t]+[0-9]+$") - string(REGEX REPLACE ".*#define CV_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MAJOR ${OpenCV_VERSIONS_TMP}) - string(REGEX REPLACE ".*#define CV_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MINOR ${OpenCV_VERSIONS_TMP}) - string(REGEX REPLACE ".*#define CV_SUBMINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_PATCH ${OpenCV_VERSIONS_TMP}) - set(OpenCV_VERSION ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH} CACHE STRING "" FORCE) - set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") - - if( "${OpenCV_VERSION}" VERSION_GREATER "2.2.99" ) - set(OPENCV_LIB_COMPONENTS - opencv_core - opencv_imgproc - opencv_highgui - opencv_ml - opencv_features2d - opencv_video - opencv_objdetect - opencv_calib3d - opencv_flann - opencv_contrib - opencv_legacy - opencv_gpu ) - else( "${OpenCV_VERSION}" VERSION_GREATER "2.2.9" ) - # old library names - set(OPENCV_LIB_COMPONENTS - cxcore - cv - ml - highgui - cvaux ) - endif( "${OpenCV_VERSION}" VERSION_GREATER "2.2.9" ) - - endif(EXISTS "${OpenCVConfig_FILE}") - - - ## Initiate the variable before the loop - set(OpenCV_LIBS "") - set(OpenCV_FOUND_TMP true) - - ## Loop over each component to determine full path - foreach(__CVLIB ${OPENCV_LIB_COMPONENTS}) - - find_library(OpenCV_${__CVLIB}_LIBRARY_DEBUG - NAMES "${__CVLIB}${CVLIB_SUFFIX}d" "lib${__CVLIB}${CVLIB_SUFFIX}d" "${__CVLIB}d" - PATHS "${OpenCV_DIR}/lib" - NO_DEFAULT_PATH) - find_library(OpenCV_${__CVLIB}_LIBRARY_RELEASE - NAMES "${__CVLIB}${CVLIB_SUFFIX}" "lib${__CVLIB}${CVLIB_SUFFIX}" "${__CVLIB}" - PATHS "${OpenCV_DIR}/lib" - NO_DEFAULT_PATH) - - #Remove the cache value - set(OpenCV_${__CVLIB}_LIBRARY "" CACHE STRING "" FORCE) - - #both debug/release - if(OpenCV_${__CVLIB}_LIBRARY_DEBUG AND OpenCV_${__CVLIB}_LIBRARY_RELEASE) - set(OpenCV_${__CVLIB}_LIBRARY debug ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} optimized ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) - #only debug - elseif(OpenCV_${__CVLIB}_LIBRARY_DEBUG) - set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} CACHE STRING "" FORCE) - #only release - elseif(OpenCV_${__CVLIB}_LIBRARY_RELEASE) - set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) - #no library found - else() - set(OpenCV_FOUND_TMP false) - endif() - - #Add to the general list - if(OpenCV_${__CVLIB}_LIBRARY) - set(OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_${__CVLIB}_LIBRARY}) - endif(OpenCV_${__CVLIB}_LIBRARY) - - endforeach(__CVLIB) - - - set(OpenCV_FOUND ${OpenCV_FOUND_TMP} CACHE BOOL "" FORCE) - - -else(EXISTS "${OpenCV_DIR}") - set(ERR_MSG "Please specify OpenCV directory using OpenCV_DIR env. variable") -endif(EXISTS "${OpenCV_DIR}") -##==================================================== - - -##==================================================== -## Print message -##---------------------------------------------------- -if(NOT OpenCV_FOUND) - # make FIND_PACKAGE friendly - if(NOT OpenCV_FIND_QUIETLY) - if(OpenCV_FIND_REQUIRED) - message(FATAL_ERROR "OpenCV required but some headers or libs not found. ${ERR_MSG}") - else(OpenCV_FIND_REQUIRED) - message(STATUS "WARNING: OpenCV was not found. ${ERR_MSG}") - endif(OpenCV_FIND_REQUIRED) - endif(NOT OpenCV_FIND_QUIETLY) -endif(NOT OpenCV_FOUND) -##==================================================== - - -##==================================================== -## Backward compatibility -##---------------------------------------------------- -#if(OpenCV_FOUND) -#option(OpenCV_BACKWARD_COMPA "Add some variable to make this script compatible with the other version of FindOpenCV.cmake" false) -#if(OpenCV_BACKWARD_COMPA) - - #find_path(OpenCV_INCLUDE_DIRS "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") - if( HAVE_OLD_OPENCV_HEADERS ) - find_path(OpenCV_INCLUDE_DIR "opencv/cv.h" HINTS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") - else( HAVE_OLD_OPENCV_HEADERS ) - find_path(OpenCV_INCLUDE_DIR "opencv2/opencv.hpp" HINTS "${OpenCV_DIR}" PATH_SUFFIXES "include" DOC "Include directory") - endif( HAVE_OLD_OPENCV_HEADERS ) - set(OpenCV_LIBRARIES "${OpenCV_LIBS}" CACHE STRING "" FORCE) - -#endif(OpenCV_BACKWARD_COMPA) -#endif(OpenCV_FOUND) -##==================================================== -if(OpenCV_FOUND) - if(HAVE_OLD_OPENCV_HEADERS) - message(STATUS " NOTE: The old OpenCV headers exist (i.e. include/opencv/cv.h) but these are deprecated") - message(STATUS " and should not be used. Use include/opencv2/opencv.hpp") - else(HAVE_OLD_OPENCV_HEADERS) - message(STATUS " NOTE: OpenCV was found, but the old-style headers (i.e. include/opencv/cv.h) do not exist") - message(STATUS " That is fine, as long as all code has already been updated to use the new headers.") - endif(HAVE_OLD_OPENCV_HEADERS) -endif(OpenCV_FOUND) diff --git a/cmake/Modules/FindOpenCV.cmake b/cmake/Modules/FindOpenCV.cmake deleted file mode 100644 index 5f0f68d..0000000 --- a/cmake/Modules/FindOpenCV.cmake +++ /dev/null @@ -1,65 +0,0 @@ -###################################################################### -# Master find script for OpenCV. -# -# Delegates to one of two other FindOpenCV scripts based -# on whether OpenCVConfig.cmake is found. -# -# ** NOTE ** the FindOpenCV script from Willow Garage uses -# Boost capitalization convention (MyProject_VARIABLE) -# instead of CMake caps convention (MYPROJECT_VARIABLE) -# for cmake variables. *We adopt their convention for compatibility* -# -# Output Variables: -# ----------------- -# OpenCV_FOUND : TRUE if search succeded -# OpenCV_INCLUDE_DIR : include path -# OpenCV_LIBRARIES : libraries in one variable (use this in your CMakeLists) -# OpenCV_VERSION : software version in the form "X.Y.Z" -# OpenCV_VERSION_MAJOR : X -# OpenCV_VERSION_MINOR : Y -# OpenCV_VERSION_PATCH : Z -# -###################################################################### -include( SetIrgPaths ) - -message(STATUS "Looking for OpenCV...") - -find_file(OpenCVConfig_FILE "OpenCVConfig.cmake" - HINTS ${OPENCV_ROOT_DIR} - $ENV{OPENCV_ROOT} - ${IRG_PACKAGES_DIR}/opencv - PATH_SUFFIXES - share/OpenCV - share/opencv - share - DOC "Location of OpenCVConfig.cmake" -) - -if( EXISTS ${OpenCVConfig_FILE} ) - - message( STATUS " Found ${OpenCVConfig_FILE}" ) - #message( STATUS " Using FindOpenCV-willow.cmake" ) - #find_package( OpenCV-willow ) - message( STATUS " Using FindOpenCV-useConfig.cmake" ) - find_package( OpenCV-useConfig ) - -else( EXISTS ${OpenCVConfig_FILE} ) - - message( STATUS " Could not find OpenCVConfig.cmake" ) - message( STATUS " Using FindOpenCV-irg.cmake" ) - find_package( OpenCV-irg ) - -endif( EXISTS ${OpenCVConfig_FILE}) - -if( OpenCV_FOUND ) - message( STATUS " Found OpenCV version ${OpenCV_VERSION} in ${OpenCV_DIR}" ) - if(CMAKE_COMPILER_IS_GNUCXX) - message(STATUS "gcc version is ${GCC_MINORVERSION}") - if (GCC_MINORVERSION VERSION_LESS "4.3" ) - message(STATUS "*** OpenCV adding -Wno-non-virtual-dtor to CMAKE_CXX_FLAGS") - set( CMAKE_CXX_FLAGS "-Wno-non-virtual-dtor" ) - endif (GCC_MINORVERSION VERSION_LESS "4.3") - endif(CMAKE_COMPILER_IS_GNUCXX) - #message( STATUS " OpenCV_LIBRARIES=${OpenCV_LIBRARIES}") - #message( STATUS " OpenCV_INCLUDE_DIR=${OpenCV_INCLUDE_DIR}") -endif( OpenCV_FOUND ) From 9e0797ab5a4074b33aa5f3b5acb298b80ea223f8 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 14 Mar 2018 15:44:18 -0700 Subject: [PATCH 65/90] Fix Qt link library for knFetchPool --- knRapid/src/CMakeLists.txt | 2 +- knRapid/src/knFetchPool/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index 67f6e71..c2be641 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -16,7 +16,7 @@ add_build_switch( rapidFrameStore KNRAPID_HAS_DDS AND EIGEN3_FOUND) add_build_switch( knFrameStoreSvc KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) -#add_build_switch( knFetchPool QT_FOUND ) +add_build_switch( knFetchPool QT_FOUND ) add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding AND IRGUTIL_irgSha1_LIBRARY AND KNRAPID_BUILD_knFetchPool ) add_build_switch( knProcessManager KNRAPID_HAS_DDS AND UNIX ) diff --git a/knRapid/src/knFetchPool/CMakeLists.txt b/knRapid/src/knFetchPool/CMakeLists.txt index a743928..add15f1 100644 --- a/knRapid/src/knFetchPool/CMakeLists.txt +++ b/knRapid/src/knFetchPool/CMakeLists.txt @@ -49,6 +49,7 @@ link_libraries ( ${MIRO_miroCore_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} + ${QT_LIBRARIES} ) if( CURL_FOUND AND CURL_HAS_SSH ) From ed36afe4fafb99034b745382e2784e6506a67af9 Mon Sep 17 00:00:00 2001 From: Mark Fischer Date: Wed, 21 Mar 2018 16:10:55 -0700 Subject: [PATCH 66/90] Link against Qt more often --- knDds/src/knDds/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index ed30ff2..151a59c 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -68,6 +68,8 @@ target_link_libraries( ${LIB_NAME} ${RTIDDS_LIBRARIES} ${KN_knShare_LIBRARY} ${catkin_LIBRARIES} + ${QT_QTXML_LIBRARY} + ${QT_QTCORE_LIBRARY} ) if ( KNDDS_HAS_DDS_LBPlugin ) From 34f62e682dac99ead9ad3c51950fcf235b681a6d Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 23 Mar 2018 08:50:29 -0700 Subject: [PATCH 67/90] Fix Qt 4/5 selection --- knDds/CMakeLists.txt | 1 + knRapid/CMakeLists.txt | 1 + knRapid/src/knSystemInfo/CMakeLists.txt | 4 ---- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 93f729f..3c9db73 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -9,6 +9,7 @@ if (CATKIN_DEVEL_PREFIX) irg_cmake kn Miro + qt_gui_cpp ) include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index aa5f626..8d5d970 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -11,6 +11,7 @@ if (CATKIN_DEVEL_PREFIX) Miro kn knDds + qt_gui_cpp ) include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) diff --git a/knRapid/src/knSystemInfo/CMakeLists.txt b/knRapid/src/knSystemInfo/CMakeLists.txt index c2c5034..6638a1b 100644 --- a/knRapid/src/knSystemInfo/CMakeLists.txt +++ b/knRapid/src/knSystemInfo/CMakeLists.txt @@ -42,10 +42,6 @@ set( HEADERS include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KN_INCLUDE_DIR} ) From 82f05385ab52206fb19c37cc821f7712a21871a9 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 13 Apr 2018 18:59:03 +0000 Subject: [PATCH 68/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10664 71bd3d61-4118-0410-985d-8aea7a627388 From a6994ca06c46a7d7b3f475fad1c970ecf03e4672 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 13 Apr 2018 18:59:09 +0000 Subject: [PATCH 69/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10665 71bd3d61-4118-0410-985d-8aea7a627388 From d0365dc44d8e404d26481fcf98d2b40e8391c9d6 Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 13 Apr 2018 18:59:11 +0000 Subject: [PATCH 70/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10666 71bd3d61-4118-0410-985d-8aea7a627388 From e9c715b82186dbad7b1102c7a4bf949c60d9dc8c Mon Sep 17 00:00:00 2001 From: mallan Date: Fri, 13 Apr 2018 18:59:13 +0000 Subject: [PATCH 71/90] merge from trunk git-svn-id: https://babelfish.arc.nasa.gov/svn/roversw/other/soraCore@10667 71bd3d61-4118-0410-985d-8aea7a627388 --- .../MobilitySubsysImplBase.cpp | 22 ++++++++++++++++++- .../rapidCommanding/MobilitySubsysImplBase.h | 1 + knRapid/src/rapidDds/CommandConstants.idl | 16 +++++++++----- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/knRapid/src/rapidCommanding/MobilitySubsysImplBase.cpp b/knRapid/src/rapidCommanding/MobilitySubsysImplBase.cpp index fbffa11..6ffca7e 100644 --- a/knRapid/src/rapidCommanding/MobilitySubsysImplBase.cpp +++ b/knRapid/src/rapidCommanding/MobilitySubsysImplBase.cpp @@ -70,6 +70,9 @@ namespace rapid case 4: // STOPALLMOTION amiRef = this->abort(); break; + case 5: // MOVEGOAL2D + amiRef = this->moveGoal2D(cmd); + break; default: boost::throw_exception(EBadSyntax(string("Unknown Mobility command cmdName:") + cmd.cmdName)); } @@ -119,6 +122,14 @@ namespace rapid }; int const NUM_SIMPLEMOVE6DOF_ARGUMENTS = sizeof(simpleMove6DofArguments) / sizeof(KeyTypePair); + KeyTypePair moveGoal2DArguments[] = { + { MOBILITY_METHOD_MOVEGOAL2D_PARAM_FRAME_NAME, MOBILITY_METHOD_MOVEGOAL2D_DTYPE_FRAME_NAME }, + { MOBILITY_METHOD_MOVEGOAL2D_PARAM_END_LOCATION, MOBILITY_METHOD_MOVEGOAL2D_DTYPE_END_LOCATION }, + { MOBILITY_METHOD_MOVEGOAL2D_PARAM_END_LOCATION_TOLERANCE, MOBILITY_METHOD_MOVEGOAL2D_DTYPE_END_LOCATION_TOLERANCE }, + { MOBILITY_METHOD_MOVEGOAL2D_PARAM_GOAL_ID, MOBILITY_METHOD_MOVEGOAL2D_DTYPE_GOAL_ID } + }; + int const NUM_MOVEGOAL2D_ARGUMENTS = sizeof(moveGoal2DArguments) / sizeof(KeyTypePair); + int const NULL_ARGUMENTS = 0; struct Cmd @@ -134,7 +145,8 @@ namespace rapid { MOBILITY_METHOD_MOVE6DOF, NUM_MOVE6DOF_ARGUMENTS, move6DofArguments, true }, { MOBILITY_METHOD_SIMPLEMOVE, NUM_SIMPLEMOVE_ARGUMENTS, simpleMoveArguments, true }, { MOBILITY_METHOD_SIMPLEMOVE6DOF, NUM_SIMPLEMOVE6DOF_ARGUMENTS, simpleMove6DofArguments, true }, - { MOBILITY_METHOD_STOPALLMOTION, NULL_ARGUMENTS, NULL, false } + { MOBILITY_METHOD_STOPALLMOTION, NULL_ARGUMENTS, NULL, false }, + { MOBILITY_METHOD_MOVEGOAL2D, NUM_MOVEGOAL2D_ARGUMENTS, moveGoal2DArguments, true }, }; static int const MOBILITY_COMMANDS = sizeof(commands) / sizeof (Cmd); } @@ -191,4 +203,12 @@ namespace rapid { boost::throw_exception(EExecFailed(string("Mobility command command not supported: abort"))); } + + MobilitySubsysImplBase::FuturePtr + MobilitySubsysImplBase::moveGoal2D(Command const& cmd) + { + boost::throw_exception(EExecFailed(string("Mobility command command not supported: ") + cmd.cmdName)); + } + + } diff --git a/knRapid/src/rapidCommanding/MobilitySubsysImplBase.h b/knRapid/src/rapidCommanding/MobilitySubsysImplBase.h index 7cfee58..55a3d15 100644 --- a/knRapid/src/rapidCommanding/MobilitySubsysImplBase.h +++ b/knRapid/src/rapidCommanding/MobilitySubsysImplBase.h @@ -40,6 +40,7 @@ namespace rapid virtual FuturePtr simpleMove6Dof(rapid::Command const& cmd); virtual FuturePtr moveTo6Dof(rapid::Command const& cmd); virtual FuturePtr abort(); + virtual FuturePtr moveGoal2D(rapid::Command const& cmd); static rapid::SubsystemType const * typeDescription(); }; diff --git a/knRapid/src/rapidDds/CommandConstants.idl b/knRapid/src/rapidDds/CommandConstants.idl index a22a8db..d6408ba 100644 --- a/knRapid/src/rapidDds/CommandConstants.idl +++ b/knRapid/src/rapidDds/CommandConstants.idl @@ -184,25 +184,20 @@ module rapid { const DataType MOBILITY_METHOD_SIMPLEMOVE6DOF_DTYPE_ROT = RAPID_MAT33f; const String32 MOBILITY_METHOD_MOVE = "move"; - const String32 MOBILITY_METHOD_MOVE_PARAM_FRAME_NAME = "referenceFrame"; const DataType MOBILITY_METHOD_MOVE_DTYPE_FRAME_NAME = RAPID_STRING; - //@copy-declaration /** Can be defined as a rotation about an axis. */ const String32 MOBILITY_METHOD_MOVE_PARAM_END_LOCATION = "xyt"; const DataType MOBILITY_METHOD_MOVE_DTYPE_END_LOCATION = RAPID_VEC3d; - //@copy-declaration /** //@copy-declaration * The x,y,theta tolerance for waypoint. Theta is specified in radians. For a non-directional waypoint, use //@copy-declaration * negative or > PI value. //@copy-declaration */ const String32 MOBILITY_METHOD_MOVE_PARAM_END_LOCATION_TOLERANCE = "xytTolerance"; const DataType MOBILITY_METHOD_MOVE_DTYPE_END_LOCATION_TOLERANCE = RAPID_VEC3d; - //@copy-declaration /** In meters/sec. */ const String32 MOBILITY_METHOD_MOVE_PARAM_HINTED_SPEED = "hintedSpeed"; const DataType MOBILITY_METHOD_MOVE_DTYPE_HINTED_SPEED = RAPID_FLOAT; - const String32 MOBILITY_METHOD_MOVE_PARAM_NAV_ALGO = "navAlgo"; const DataType MOBILITY_METHOD_MOVE_DTYPE_NAV_ALGO = RAPID_STRING; @@ -215,13 +210,22 @@ module rapid { const DataType MOBILITY_METHOD_MOVE6DOF_DTYPE_END_LOCATION_TOLERANCE = RAPID_VEC3d; const String32 MOBILITY_METHOD_MOVE6DOF_PARAM_ROT = "rot"; const DataType MOBILITY_METHOD_MOVE6DOF_DTYPE_ROT = RAPID_MAT33f; - //@copy-declaration /** In meters/sec. */ const String32 MOBILITY_METHOD_MOVE6DOF_PARAM_HINTED_SPEED = "hintedSpeed"; const DataType MOBILITY_METHOD_MOVE6DOF_DTYPE_HINTED_SPEED = RAPID_FLOAT; const String32 MOBILITY_METHOD_MOVE6DOF_PARAM_NAV_ALGO = "navAlgo"; const DataType MOBILITY_METHOD_MOVE6DOF_DTYPE_NAV_ALGO = RAPID_STRING; + const String32 MOBILITY_METHOD_MOVEGOAL2D = "moveGoal2D"; + const String32 MOBILITY_METHOD_MOVEGOAL2D_PARAM_FRAME_NAME = "referenceFrame"; + const DataType MOBILITY_METHOD_MOVEGOAL2D_DTYPE_FRAME_NAME = RAPID_STRING; + const String32 MOBILITY_METHOD_MOVEGOAL2D_PARAM_END_LOCATION = "xyt"; + const DataType MOBILITY_METHOD_MOVEGOAL2D_DTYPE_END_LOCATION = RAPID_VEC3d; + const String32 MOBILITY_METHOD_MOVEGOAL2D_PARAM_END_LOCATION_TOLERANCE = "xytTolerance"; + const DataType MOBILITY_METHOD_MOVEGOAL2D_DTYPE_END_LOCATION_TOLERANCE = RAPID_VEC3d; + const String32 MOBILITY_METHOD_MOVEGOAL2D_PARAM_GOAL_ID = "goalId"; + const DataType MOBILITY_METHOD_MOVEGOAL2D_DTYPE_GOAL_ID = RAPID_STRING; + //@copy-declaration /** Navigation Algorithm for MobilityCommand. */ const String32 NAV_ALGO_SAFE = "RAPID_NAV_SAFE"; const String32 NAV_ALGO_BLIND = "RAPID_NAV_BLIND"; From 1091974e45156f504f6c15c969f30ad5d25e4c83 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 1 May 2018 15:50:03 -0700 Subject: [PATCH 72/90] Fragile fix for a fragile build... adding qt_gui_cpp to catkin find_package caused bizzare link problems downstream with libdl. Adding -ldl to the examples that were failing had no effect. Adding -ldl immediately following RTIDDS_LIBRARIES in knDds, however, inexplicably solves the problem. The RTIDDS_LIBRARIES variable ALREADY includes libdl. Also, the full paths to libraries in the RTIDDS_LIBRARIES are stripped and what makes it into the link link is -lnddscore, etc. I dont know if catkin is munging it or cmake, but this behavior is very very bad. --- knDds/src/knDds/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index 151a59c..bd176f3 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -62,10 +62,26 @@ add_target_definitions( ${LIB_NAME} ${EXPORT_DEFINE} ) # DDS defines apply to all projects in this directory add_srcdir_definitions( ${RTIDDS_DEFINES} ) +## NOTE catkin_build +## Unexplained linking failures occur with the knDds examples if qt_gui_cpp +## is added to the find_package(catkin...) list, e.g. +## .../libnddscore.so: undefined reference to `dlopen' +## .../libnddscore.so: undefined reference to `dlclose' +## .../libnddscore.so: undefined reference to `dlerror' +## .../libnddscore.so: undefined reference to `dlsym' +## Adding ${CMAKE_DL_LIBS} (dl) to the link line on the examples does not fix +## the problem, but adding ${CMAKE_DL_LIBS} immediately after ${RTIDDS_LIBRARIES} +## does. Note that ${RTIDDS_LIBRARIES} ALREADY has -ldl in the variable. However, +## while the RTIDDS_LIBRARIES variable has the full paths to the RTI libraries, +## the link line does NOT. I don't know if it is catkin or cmake that is munging +## the contents of the RTIDDS_LIBRARIES variable but non-deterministic behavior +## in a build system is not OK. + target_link_libraries( ${LIB_NAME} ${ACE_LIBRARIES} ${MIRO_miroXml_LIBRARY} ${RTIDDS_LIBRARIES} + ${CMAKE_DL_LIBS} ${KN_knShare_LIBRARY} ${catkin_LIBRARIES} ${QT_QTXML_LIBRARY} From 349d42affca1b488961780d62a7fc5c6eddb4a97 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Wed, 2 May 2018 14:40:50 -0700 Subject: [PATCH 73/90] Modified comment. The release version of RTI 5.2.3 does not display the link problem, but the 5.2.3.15 engineering release (router fix) does. Not going to spend any more time on this. --- knDds/src/knDds/CMakeLists.txt | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index bd176f3..478980f 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -63,19 +63,13 @@ add_target_definitions( ${LIB_NAME} ${EXPORT_DEFINE} ) add_srcdir_definitions( ${RTIDDS_DEFINES} ) ## NOTE catkin_build -## Unexplained linking failures occur with the knDds examples if qt_gui_cpp -## is added to the find_package(catkin...) list, e.g. -## .../libnddscore.so: undefined reference to `dlopen' -## .../libnddscore.so: undefined reference to `dlclose' -## .../libnddscore.so: undefined reference to `dlerror' -## .../libnddscore.so: undefined reference to `dlsym' -## Adding ${CMAKE_DL_LIBS} (dl) to the link line on the examples does not fix -## the problem, but adding ${CMAKE_DL_LIBS} immediately after ${RTIDDS_LIBRARIES} -## does. Note that ${RTIDDS_LIBRARIES} ALREADY has -ldl in the variable. However, -## while the RTIDDS_LIBRARIES variable has the full paths to the RTI libraries, -## the link line does NOT. I don't know if it is catkin or cmake that is munging -## the contents of the RTIDDS_LIBRARIES variable but non-deterministic behavior -## in a build system is not OK. +## Unexplained linking failures in examples ocurred on Ubuntu 14.04 with the +## RTI 5.2.3.15_ROUTING-198-eng-build, but not 5.2.3 release. Adding ${CMAKE_DL_LIBS} (dl) +## to the link line on the examples did not fix the problem, but adding ${CMAKE_DL_LIBS} +## immediately after ${RTIDDS_LIBRARIES} does. Note that ${RTIDDS_LIBRARIES} ALREADY has +## -ldl in the variable. However, while the RTIDDS_LIBRARIES variable has the full paths +## to the RTI libraries, the link line does NOT. I don't know if it is catkin or cmake +## that is munging the contents of the RTIDDS_LIBRARIES variable. target_link_libraries( ${LIB_NAME} ${ACE_LIBRARIES} From 54b104a1d362438ae976ec35e5ace903e6e54abe Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 16 May 2018 09:53:39 -0700 Subject: [PATCH 74/90] Add qt libraries to resolve missing symbols This issue crops up occasionally with different linker versions being better in stripping off library dependencies upstream or being worse in resolving symbols transitively. --- knDds/CMakeLists.txt | 2 +- knDds/src/knDds/CMakeLists.txt | 1 + knRapid/src/rapidCommanding/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index d7f664f..8f99120 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -52,7 +52,7 @@ add_build_var( WITH_DDS NOT APPLE ) find_package( RtiDds ) find_package( ACE ) -find_package( Qt4 ) +find_package( Qt4 COMPONENTS QtCore QtGui) find_package( PThreads-win32 ) find_package( Boost 1.50.0 COMPONENTS program_options filesystem system chrono) diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index ed30ff2..c148fe5 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -68,6 +68,7 @@ target_link_libraries( ${LIB_NAME} ${RTIDDS_LIBRARIES} ${KN_knShare_LIBRARY} ${catkin_LIBRARIES} + ${QT_QTCORE_LIBRARY} ) if ( KNDDS_HAS_DDS_LBPlugin ) diff --git a/knRapid/src/rapidCommanding/CMakeLists.txt b/knRapid/src/rapidCommanding/CMakeLists.txt index 4813ce4..b8f714e 100644 --- a/knRapid/src/rapidCommanding/CMakeLists.txt +++ b/knRapid/src/rapidCommanding/CMakeLists.txt @@ -68,6 +68,7 @@ target_link_libraries( ${LIB_NAME} ${KNDDS_knDds_LIBRARY} ${MIRO_miroXml_LIBRARY} ${RTIDDS_LIBRARIES} + ${QT_QTXML_LIBRARY} ) # export define only applies to lib From 37f06bccad86013e05d4f7f43243ffadb710fdb3 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Mon, 20 Aug 2018 14:42:46 -0700 Subject: [PATCH 75/90] merge hhutz catkin_make and modify Qt5 detection to use MIRO_BUILD_WITH_QT5 --- knDds/CMakeLists.txt | 3 +-- knRapid/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/knDds/CMakeLists.txt b/knDds/CMakeLists.txt index 3c9db73..9b9e143 100644 --- a/knDds/CMakeLists.txt +++ b/knDds/CMakeLists.txt @@ -9,7 +9,6 @@ if (CATKIN_DEVEL_PREFIX) irg_cmake kn Miro - qt_gui_cpp ) include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) @@ -52,7 +51,7 @@ endif( CMAKE_COMPILER_IS_GNUCXX ) add_build_var( WITH_DDS NOT APPLE ) find_package( RtiDds ) -if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ") +if( MIRO_BUILD_WITH_QT5 ) message(STATUS "FOUND QT 5") find_package(Qt5Widgets REQUIRED) find_package(Qt5Xml REQUIRED) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 8d5d970..4555c24 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -11,7 +11,6 @@ if (CATKIN_DEVEL_PREFIX) Miro kn knDds - qt_gui_cpp ) include_directories( ${CATKIN_DEVEL_PREFIX}/include ) endif(CATKIN_DEVEL_PREFIX) @@ -60,7 +59,7 @@ endif (NOT catkin_FOUND) add_build_var( WITH_DDS NOT APPLE ) find_package( RtiDds ) -if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ") +if( MIRO_BUILD_WITH_QT5 ) message(STATUS "FOUND QT 5") find_package(Qt5Widgets REQUIRED) find_package(Qt5Xml REQUIRED) From 66bfa411c92dd69201034667b5a900e0a7aa668b Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 24 Aug 2018 15:59:14 -0700 Subject: [PATCH 76/90] Moving helpers from rovernav to kn --- kn/src/knGeometry/CMakeLists.txt | 2 + kn/src/knGeometry/Polygon.cpp | 79 ++++++++ kn/src/knGeometry/Polygon.h | 59 ++++++ kn/src/knMath/CMakeLists.txt | 2 + kn/src/knMath/Functions.h | 77 +++++++ kn/src/knMath/Plane.cpp | 333 +++++++++++++++++++++++++++++++ kn/src/knMath/Plane.h | 118 +++++++++++ kn/src/knMath/Vector.h | 2 + kn/src/knShare/Time.h | 14 ++ 9 files changed, 686 insertions(+) create mode 100644 kn/src/knGeometry/Polygon.cpp create mode 100644 kn/src/knGeometry/Polygon.h create mode 100644 kn/src/knMath/Functions.h create mode 100644 kn/src/knMath/Plane.cpp create mode 100644 kn/src/knMath/Plane.h diff --git a/kn/src/knGeometry/CMakeLists.txt b/kn/src/knGeometry/CMakeLists.txt index ab8990a..9711418 100644 --- a/kn/src/knGeometry/CMakeLists.txt +++ b/kn/src/knGeometry/CMakeLists.txt @@ -11,11 +11,13 @@ string( TOUPPER "${EXPORT}_BUILD_DLL" EXPORT_DEFINE ) set( SOURCES PointCloud.cpp + Polygon.cpp ) set( HEADERS ${EXPORT_FILE} PointCloud.h + Polygon.h ) include_directories( diff --git a/kn/src/knGeometry/Polygon.cpp b/kn/src/knGeometry/Polygon.cpp new file mode 100644 index 0000000..b63572f --- /dev/null +++ b/kn/src/knGeometry/Polygon.cpp @@ -0,0 +1,79 @@ +#include "Polygon.h" + +namespace kn +{ +using namespace std; + +bool Polygon::contains(const Vector2& point) { + // http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ + // (y - y0) (x1 - x0) - (x - x0) (y1 - y0) + if (m_defined) { + if (m_convex) { + Vector2 dx(m_vertices[0] - m_vertices[m_vertices.size()-1]); + Vector2 p(point - m_vertices[m_vertices.size()-1]); + bool sign = (p.y()*dx.x() - p.x()*dx.y()) >= 0.; + for (unsigned i = 1; i < m_vertices.size(); i++) { + dx = m_vertices[i] - m_vertices[i-1]; + p = point - m_vertices[i]; + if (( p.y()*dx.x() - p.x()*dx.y() >= 0.) != sign) + return false; + } // for + } // if convex + else + assert(false); // TODO - general polygon containment test + } // if defined + else + assert(false); + return true; +} // contains + +void Polygon::affine_transform(const Matrix2x2& A, Vector2 b) +{ + for (vector::iterator it = m_vertices.begin(); + it != m_vertices.end(); + it++) { + (*it) = A * (*it); + (*it) += b; + } +} + +void Polygon::operator *= (const Matrix2x2& A) { + for (vector::iterator it = m_vertices.begin(); + it != m_vertices.end(); + it++) + (*it) = A*(*it); +} + +void Polygon::operator += (const Vector2 x) { + for (vector::iterator it = m_vertices.begin(); + it != m_vertices.end(); + it++) + (*it) += x; +} + +bool Polygon::_convex() { + // TODO: test this! + unsigned i,j,k; + int flag = 0; + double z; + + if (m_vertices.size() < 3) + return(false); + + for (i=0; i 0) + flag |= 2; + if (flag == 3) + return(false); + } + return (flag != 0); +} +} diff --git a/kn/src/knGeometry/Polygon.h b/kn/src/knGeometry/Polygon.h new file mode 100644 index 0000000..e8d9554 --- /dev/null +++ b/kn/src/knGeometry/Polygon.h @@ -0,0 +1,59 @@ +//========================================================================== +// +// File: Polygon.h +// +// PROJECT: rovernav +// MODULE: math +// +// $Author: pedersen $ +// $Date: (Sat, July 2008) $ +// $Revision: $ +// +// (c) Copyright NASA Ames Research Center. All rights reserved. +//=========================================================================== + +/*! Polygon classes */ + +#ifndef _ROVERNAV_POLYGON_H_ +#define _ROVERNAV_POLYGON_H_ + +#include "knMath/Vector.h" +#include "knMath/Matrix.h" + +#include + +namespace kn { + + //! Convex polygon class (assumes constructors correct) + class Polygon { + public: + Polygon() : + m_defined(false), + m_convex(false), + m_vertices() {} + Polygon(const std::vector& vertices) : + m_defined(vertices.size() > 2), + m_convex(true), + m_vertices(vertices) {} + // todo: check for convexity. + ~Polygon() {} + + unsigned size() { return m_vertices.size(); } + Vector2 operator() (unsigned i) const { return m_vertices[i]; } + Vector2& operator() (unsigned i) { return m_vertices[i]; } + + bool contains(const Vector2& point); + + void affine_transform(const Matrix2x2& A, Vector2 b); + void operator *= (const Matrix2x2& A); + void operator += (const Vector2 b); + + private: + bool m_defined; + bool m_convex; + std::vector m_vertices; + bool _convex(); + }; // class Polygon + +} // namespace rovernav +#endif // _ROVERNAV_POLYGON_H_ diff --git a/kn/src/knMath/CMakeLists.txt b/kn/src/knMath/CMakeLists.txt index 6326e94..be60d93 100644 --- a/kn/src/knMath/CMakeLists.txt +++ b/kn/src/knMath/CMakeLists.txt @@ -12,6 +12,7 @@ string( TOUPPER "${EXPORT}_BUILD_DLL" EXPORT_DEFINE ) set( SOURCES ATrans.cpp RotMat3d.cpp + Plane.cpp ) set( HEADERS @@ -24,6 +25,7 @@ set( HEADERS Quaternion.h RotMat3d.h Vector.h + Plane.h ) include_directories( diff --git a/kn/src/knMath/Functions.h b/kn/src/knMath/Functions.h new file mode 100644 index 0000000..1fb8d84 --- /dev/null +++ b/kn/src/knMath/Functions.h @@ -0,0 +1,77 @@ +//========================================================================== +// +// File: Functions.h +// +// PROJECT: kn +// +// $Author: pedersen $ +// $Date: July 2008 $ +// $Revision: $ +// +// (c) Copyright NASA Ames Research Center. All rights reserved. +//=========================================================================== + +#ifndef knMath_Functions_h +#define knMath_Functions_h + +#include + +namespace kn +{ + template + inline T degrees(T x) { return x * 180.0 / M_PI; } + + template + inline T radians(T x) { return x * M_PI / 180.0; } + + template + inline void mod(T& x, T y) + /*!< replace x by x mod y, extending C++ % to give valid + results for all signs of x and y : + By convention: + mod(x, y) has same sign as y. + x mod 0 is undefined. + x < 0 ==> mod(x,y) in [0,y) + x%y in (-abs(y),0] + + This guarantees that mod(x,y) is always a valid + index for example. + */ + { + x %= y; + if ((x < 0 && y > 0) || (y < 0 && x > 0)) + x += y; + } + + template + inline int signum(T x) { return (x > 0 ? 1 : (x < 0 ? -1:0)); } + +// template +// inline int sgn(T x) { return (x > 0 ? 1 : (x < 0 ? -1:0)); } + +// template +// inline T sign(T a, T b) { return (b > 0 ? fabs(a): -fabs(b)); } + + template + inline T sqr(T x) { return x*x; }; + + template + inline T cube(T x) { return x*x*x; }; + + template + inline T mean(T a,T2 b) { return (a+(T)b)/2; }; + +// template +// inline T step(T x, T1 threshold) +// { +// return (x <= threshold ? 0 : 1); +// } + + template + inline A linear_scale(A value, B min, C max) + { + return (value <= min ? 0 : value >= max ? 1 : (value-min)/(max-min)); + } + +}; +#endif // knMath_Functions_h diff --git a/kn/src/knMath/Plane.cpp b/kn/src/knMath/Plane.cpp new file mode 100644 index 0000000..c5ddeff --- /dev/null +++ b/kn/src/knMath/Plane.cpp @@ -0,0 +1,333 @@ +//========================================================================== +// +// File: Plane.cpp +// +// PROJECT: rovernav +// MODULE: travmap +// +// $Author: pedersen $ +// $Date: 2008-11-21 09:37:07 -0800 (Fri, 21 Nov 2008) $ +// $Revision: 2432 $ +// +// (c) Copyright NASA Ames Research Center. All rights reserved. +//=========================================================================== + +#include "Plane.h" +#include +#include + +namespace kn +{ + + using namespace std; + +/////////////////////////////////////////////////////////////////////// +// Plane +/// Construct plane represented by z = a*x + b*y + c +Plane::Plane(double a, double b, double c) : + m_A(a), m_B(b), m_C(c) +{} + +Plane::Plane(const Vector3& normal, const Vector3& origin) : + m_A(-normal.x()/normal.z()), + m_B(-normal.y()/normal.z()), + m_C(-m_A*origin.x() - m_B*origin.y() + origin.z()) +{} + +void Plane::clear() { + m_A = m_B = m_C = 0.0; +} + +void Plane::computeNormal(Vector3& normal) const { + normal.x() = -m_A; + normal.y() = -m_B; + normal.z() = 1.0; + normal /= normal.norm(); +} + +void Plane::computeGradient(double& gradient) const { + double x = sqrt(1/(1+ m_A*m_A)); + double y = sqrt(1/(1+ m_B*m_B)); + double Zxy = fabs(x*m_A + y*m_B); + + //get the slope of the line through this point and the origin + gradient = Zxy / sqrt(x*x + y*y); +} + +void Plane::computeRollPitch(double &roll, double &pitch, double yaw) + const { + double q, cy, sy; + + cy = cos(yaw); sy = sin(yaw); + q = sqrt(m_A*m_A + m_B*m_B + 1); + pitch = asin((m_B*cy - m_A*sy)/q); + roll = atan(-m_A*cy-m_B*sy); +} + +double Plane::height(double x, double y) const { + return m_A*x + m_B*y + m_C; +} + + +/////////////////////////////////////////////////////// +/////////////////////////////////////////////////////// + +PlaneFitMoments::PlaneFitMoments() : + m_numPoints(0), + m_weight(0.0), + Sx(0), Sy(0), Sz(0), + Sxx(0), Syy(0), Szz(0), Sxy(0), Sxz(0), Syz(0) +{ +} + +PlaneFitMoments::~PlaneFitMoments() +{ +} + +void PlaneFitMoments::addPoint(const Vector3& p) +{ + m_numPoints++; + m_weight++; + Sx += p.x(); + Sy += p.y(); + Sz += p.z(); + Sxx += (p.x()*p.x()); + Syy += (p.y()*p.y()); + Szz += (p.z()*p.z()); + Sxy += (p.x()*p.y()); + Sxz += (p.x()*p.z()); + Syz += (p.y()*p.z()); +} + +void PlaneFitMoments::clear() +{ + m_numPoints = 0; + m_weight = 0.0; + Sx = Sy = Sz = Sxx = Syy = Szz = Sxy = Sxz = Syz = 0.0; +} + +void PlaneFitMoments::computePlane(Plane& plane) const { + if (m_numPoints < 3.0) { + // TODO: better statistical test for sufficient data + plane.clear(); + } + else + { + double det = + Sx*(-(Syy*Sx) + Sxy*Sy) + + Sxy*( (Sy*Sx) - Sxy*m_weight) + + Sxx*(-(Sy*Sy) + Syy*m_weight); + + plane.A() = + (Sz * (-(Sx*Syy) + Sxy*Sy) + + Syz * ( (Sx*Sy) - Sxy*m_weight) + + Sxz * (-(Sy*Sy) + Syy*m_weight)) + /det; + + plane.B() = + (Sz * ( (Sx*Sxy) - Sxx*Sy) + + Syz * (-(Sx*Sx) + Sxx*m_weight) + + Sxz * ( (Sy*Sx) - Sxy*m_weight)) + /det; + + plane.C() = + (Sz * (-(Sxy*Sxy) + Sxx*Syy) + + Syz * ( (Sxy*Sx) - Sxx*Sy) + + Sxz * (-(Syy*Sx) + Sxy*Sy)) + /det; + } +} + +double PlaneFitMoments::getResidual(const Plane& plane) const +{ + double residual; + if (m_weight <= 0.0) + residual = 0.0; // TODO: better statistical test + else + { + /* SQR((Sz)-A(Sx)-B(Sy)-C(S))*/ + double A = plane.A(), B = plane.B(), C = plane.C(); + double chiSquared = + Szz + A*A*Sxx + B*B*Syy + C*C*m_weight + + 2*(A*(C*Sx - Sxz + B*Sxy)+ B*(C*Sy - Syz) - C*Sz); + + // sanity/numerical precision check + if (chiSquared < 0) { + // only print the message if it's really bad... + if (chiSquared <-1e-4) + cout << "WARNING! Chi Squared <0? ChiSquared = " + << chiSquared < +#include +#include "Vector.h" +#include "Matrix.h" + +namespace kn +{ + + + class Plane { + public: + /// Construct plane represented by z = a*x + b*y + c + Plane(double a = 0, double b = 0, double c = 0); + Plane(const Vector3& normal, const Vector3& origin); + ~Plane() {}; + void clear(); + + Vector3 getNormal() const { Vector3 temp; computeNormal(temp); return temp; } + void computeNormal(Vector3& normal) const; + void computeGradient(double& gradient) const; + void computeRollPitch(double& roll, double& pitch, double yaw = 0) const; + + double height(double x, double y) const; + + friend std::ostream& operator << (std::ostream& o, + const Plane& rhs) { + return (o << std::setprecision(2) << std::setw(3) + << "(" << rhs.A() << " " + << rhs.B() << " " + << rhs.C()) << ")"; + } + + inline const double& A() const { return m_A; } + inline const double& B() const { return m_B; } + inline const double& C() const { return m_C; } + + inline double& A() { return m_A; } + inline double& B() { return m_B; } + inline double& C() { return m_C; } + + private: + double m_A, m_B, m_C; + }; // class Plane + + ///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + + class PlaneFitMoments { + public: + PlaneFitMoments(); + ~PlaneFitMoments(); + + void addPoint(const Vector3& p); + void clear(); + + /*! Compute best fit plane (minizing error in z) */ + Plane getPlane() const { Plane temp; computePlane(temp); return temp; } + void computePlane(Plane& plane) const; + + /*! mean residual chi^2 error ((z - plane.height(x,y))^2) between + @param plane and points in plane fit moments */ + double getResidual(const Plane& plane) const; + + double meanHeight() const; + bool computeMean(Vector3& mean) const; + + double heightVariance() const; + bool computeCovariance(Matrix3x3& cov) const; + + /*! cumulative weight */ + inline int numPoints() const { return m_numPoints ; } + inline double weight() const { return m_weight; } + + void operator+=(const PlaneFitMoments& rhs); + void operator-=(const PlaneFitMoments& rhs); + PlaneFitMoments operator-(const PlaneFitMoments& rhs) const; + PlaneFitMoments operator+(const PlaneFitMoments& rhs) const; + + void operator *= (double rhs); + void operator /= (double rhs); + PlaneFitMoments operator * (double rhs) const; + PlaneFitMoments operator / (double rhs) const; + + private: + int m_numPoints; + double m_weight; + double Sx, Sy, Sz, Sxx, Syy, Szz, Sxy, Sxz, Syz; + }; // class PlaneFitMoments + +} // namespace rovernav +#endif + + diff --git a/kn/src/knMath/Vector.h b/kn/src/knMath/Vector.h index 452f884..10e58ab 100644 --- a/kn/src/knMath/Vector.h +++ b/kn/src/knMath/Vector.h @@ -36,6 +36,8 @@ namespace kn * to a number of "obviously preferred ones. */ + typedef Eigen::VectorXd Vector; + /** @ingroup knMath */ typedef Eigen::Vector3d Vector3; /** @ingroup knMath */ diff --git a/kn/src/knShare/Time.h b/kn/src/knShare/Time.h index e385efa..9601a49 100644 --- a/kn/src/knShare/Time.h +++ b/kn/src/knShare/Time.h @@ -69,6 +69,20 @@ namespace kn friend knShare_Export std::ostream& operator<<(std::ostream& ostr, Time6 const& timestamp); }; + + inline double tv2d(TimePoint const& time) + { + duration durationInSeconds(time.time_since_epoch()); + + return durationInSeconds.count(); + } + inline double tv2d(Duration const& d) + { + duration durationInSeconds(d); + + return durationInSeconds.count(); + } + } #endif From ed84b20303ff87e8d5c1a3f66f921a48b112ebb9 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Sun, 26 Aug 2018 15:12:49 -0700 Subject: [PATCH 77/90] More tweaks from unforking builds --- kn/src/knMath/Functions.h | 41 ++++++++++++++++++++++++++++ kn/src/knShare/Array2DView.cpp | 4 +-- kn/src/knShare/Array2DView.h | 6 ++-- knRapid/src/CMakeLists.txt | 4 +-- knRapid/src/knRaft/FileAnnouncer.cpp | 4 +-- 5 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 kn/src/knMath/Functions.h diff --git a/kn/src/knMath/Functions.h b/kn/src/knMath/Functions.h new file mode 100644 index 0000000..7ecdecf --- /dev/null +++ b/kn/src/knMath/Functions.h @@ -0,0 +1,41 @@ +//========================================================================== +// +// File: Functions.h +// +// PROJECT: kn +// MODULE: knMath +// +// $Author: pedersen $ +// $Date: July 2008 $ +// $Revision: $ +// +// (c) Copyright NASA Ames Research Center. All rights reserved. +//=========================================================================== + +#ifndef kn_Functions_h +#define kn_Functions_h + +#include + +namespace kn +{ + template + inline T degrees(T x) { return x * 180.0 / M_PI; } + + template + inline T radians(T x) { return x * M_PI / 180.0; } + + template + inline int signum(T x, T epsilon = T(0)) { return (epsilon < x) - (x < epsilon); } + + template + inline T sqr(T x) { return x*x; }; + + template + inline T cube(T x) { return x*x*x; }; + + template + inline T mean(T a,T2 b) { return (a+(T)b)/2; }; + +} +#endif // kn_Functions_h diff --git a/kn/src/knShare/Array2DView.cpp b/kn/src/knShare/Array2DView.cpp index 0e62b10..748c184 100644 --- a/kn/src/knShare/Array2DView.cpp +++ b/kn/src/knShare/Array2DView.cpp @@ -47,7 +47,7 @@ namespace kn m_sizeX(0), m_sizeY(0) { - set_size(x, y); + resize(x, y); } int @@ -67,7 +67,7 @@ namespace kn } void - Array2DViewBase::set_size(size_t x, size_t y) + Array2DViewBase::resize(size_t x, size_t y) { if (x != m_sizeX || y != m_sizeY) { diff --git a/kn/src/knShare/Array2DView.h b/kn/src/knShare/Array2DView.h index 36a2e13..d2ce998 100644 --- a/kn/src/knShare/Array2DView.h +++ b/kn/src/knShare/Array2DView.h @@ -71,7 +71,7 @@ namespace kn static int iLog2(int x); protected: - void set_size(size_t x, size_t y); + void resize(size_t x, size_t y); private: size_t m_sizeX; @@ -125,9 +125,9 @@ namespace kn return m_cells[index(x, y)]; } - void set_size(size_t x, size_t y) { + void resize(size_t x, size_t y) { if (x != sizeX() || y != sizeY()) { - Array2DViewBase::set_size(x, y); + Array2DViewBase::resize(x, y); if (x > 0 && y > 0) { m_cells.reset(new Cell[numCells()]); } diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index c2be641..57e98bb 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -16,8 +16,8 @@ add_build_switch( rapidFrameStore KNRAPID_HAS_DDS AND EIGEN3_FOUND) add_build_switch( knFrameStoreSvc KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) -add_build_switch( knFetchPool QT_FOUND ) -add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding AND IRGUTIL_irgSha1_LIBRARY AND KNRAPID_BUILD_knFetchPool ) +add_subdirectory( knFetchPool ) +add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding ) add_build_switch( knProcessManager KNRAPID_HAS_DDS AND UNIX ) diff --git a/knRapid/src/knRaft/FileAnnouncer.cpp b/knRapid/src/knRaft/FileAnnouncer.cpp index aaf42d7..160267d 100644 --- a/knRapid/src/knRaft/FileAnnouncer.cpp +++ b/knRapid/src/knRaft/FileAnnouncer.cpp @@ -93,11 +93,11 @@ FileAnnouncer::announceFile(const char* path, } m_publisher->sendEvent(); - return TRUE; + return true; } KN_ERROR_OSTR("FileAnnouncer: file \"" << path << "\" is invalid: exists=" << fi.exists() << ", isFile=" << fi.isFile() << ", isReadable=" << fi.isReadable()); - return FALSE; + return false; } From 77b192d41f71269e3b9b566edd40fef80b76a178 Mon Sep 17 00:00:00 2001 From: Julius Date: Thu, 6 Sep 2018 17:10:13 -0700 Subject: [PATCH 78/90] Added image cropping, quality, and frame rate keys to ImageMetadata.idl --- knRapid/src/rapidDds/ImageMetadata.idl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/knRapid/src/rapidDds/ImageMetadata.idl b/knRapid/src/rapidDds/ImageMetadata.idl index 97b99a6..d79603e 100644 --- a/knRapid/src/rapidDds/ImageMetadata.idl +++ b/knRapid/src/rapidDds/ImageMetadata.idl @@ -20,6 +20,12 @@ module rapid { const String32 IMG_V_FOV_KEY = "IMG_V_FOV"; const String32 IMG_H_FOV_KEY = "IMG_H_FOV"; + const String32 IMG_CROP_X_KEY = "CROP_X"; + const String32 IMG_CROP_Y_KEY = "CROP_Y"; + const String32 IMG_CROP_W_KEY = "CROP_WIDTH"; + const String32 IMG_CROP_H_KEY = "CROP_HEIGHT"; + const String32 IMG_JPEG_Q_KEY = "JPEG_QUALITY"; + const String32 IMG_MIN_SEP_KEY = "MIN_SEPARATION"; //@copy-declaration /** //@copy-declaration * Holds status information for an image sensor - typically a camera, but could be a laser scanner, gpr, or From 3b493f9a06a863707103fa5ed9f0d5d04936e4dd Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 13 Sep 2018 09:14:16 -0700 Subject: [PATCH 79/90] Minimize imports --- kn/src/knGeometry/CMakeLists.txt | 2 - kn/src/knGeometry/Polygon.cpp | 79 -------- kn/src/knGeometry/Polygon.h | 59 ------ kn/src/knMath/CMakeLists.txt | 3 +- kn/src/knMath/Functions.h | 1 + kn/src/knMath/Plane.cpp | 333 ------------------------------- kn/src/knMath/Plane.h | 118 ----------- 7 files changed, 2 insertions(+), 593 deletions(-) delete mode 100644 kn/src/knGeometry/Polygon.cpp delete mode 100644 kn/src/knGeometry/Polygon.h delete mode 100644 kn/src/knMath/Plane.cpp delete mode 100644 kn/src/knMath/Plane.h diff --git a/kn/src/knGeometry/CMakeLists.txt b/kn/src/knGeometry/CMakeLists.txt index 9711418..ab8990a 100644 --- a/kn/src/knGeometry/CMakeLists.txt +++ b/kn/src/knGeometry/CMakeLists.txt @@ -11,13 +11,11 @@ string( TOUPPER "${EXPORT}_BUILD_DLL" EXPORT_DEFINE ) set( SOURCES PointCloud.cpp - Polygon.cpp ) set( HEADERS ${EXPORT_FILE} PointCloud.h - Polygon.h ) include_directories( diff --git a/kn/src/knGeometry/Polygon.cpp b/kn/src/knGeometry/Polygon.cpp deleted file mode 100644 index b63572f..0000000 --- a/kn/src/knGeometry/Polygon.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "Polygon.h" - -namespace kn -{ -using namespace std; - -bool Polygon::contains(const Vector2& point) { - // http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ - // (y - y0) (x1 - x0) - (x - x0) (y1 - y0) - if (m_defined) { - if (m_convex) { - Vector2 dx(m_vertices[0] - m_vertices[m_vertices.size()-1]); - Vector2 p(point - m_vertices[m_vertices.size()-1]); - bool sign = (p.y()*dx.x() - p.x()*dx.y()) >= 0.; - for (unsigned i = 1; i < m_vertices.size(); i++) { - dx = m_vertices[i] - m_vertices[i-1]; - p = point - m_vertices[i]; - if (( p.y()*dx.x() - p.x()*dx.y() >= 0.) != sign) - return false; - } // for - } // if convex - else - assert(false); // TODO - general polygon containment test - } // if defined - else - assert(false); - return true; -} // contains - -void Polygon::affine_transform(const Matrix2x2& A, Vector2 b) -{ - for (vector::iterator it = m_vertices.begin(); - it != m_vertices.end(); - it++) { - (*it) = A * (*it); - (*it) += b; - } -} - -void Polygon::operator *= (const Matrix2x2& A) { - for (vector::iterator it = m_vertices.begin(); - it != m_vertices.end(); - it++) - (*it) = A*(*it); -} - -void Polygon::operator += (const Vector2 x) { - for (vector::iterator it = m_vertices.begin(); - it != m_vertices.end(); - it++) - (*it) += x; -} - -bool Polygon::_convex() { - // TODO: test this! - unsigned i,j,k; - int flag = 0; - double z; - - if (m_vertices.size() < 3) - return(false); - - for (i=0; i 0) - flag |= 2; - if (flag == 3) - return(false); - } - return (flag != 0); -} -} diff --git a/kn/src/knGeometry/Polygon.h b/kn/src/knGeometry/Polygon.h deleted file mode 100644 index e8d9554..0000000 --- a/kn/src/knGeometry/Polygon.h +++ /dev/null @@ -1,59 +0,0 @@ -//========================================================================== -// -// File: Polygon.h -// -// PROJECT: rovernav -// MODULE: math -// -// $Author: pedersen $ -// $Date: (Sat, July 2008) $ -// $Revision: $ -// -// (c) Copyright NASA Ames Research Center. All rights reserved. -//=========================================================================== - -/*! Polygon classes */ - -#ifndef _ROVERNAV_POLYGON_H_ -#define _ROVERNAV_POLYGON_H_ - -#include "knMath/Vector.h" -#include "knMath/Matrix.h" - -#include - -namespace kn { - - //! Convex polygon class (assumes constructors correct) - class Polygon { - public: - Polygon() : - m_defined(false), - m_convex(false), - m_vertices() {} - Polygon(const std::vector& vertices) : - m_defined(vertices.size() > 2), - m_convex(true), - m_vertices(vertices) {} - // todo: check for convexity. - ~Polygon() {} - - unsigned size() { return m_vertices.size(); } - Vector2 operator() (unsigned i) const { return m_vertices[i]; } - Vector2& operator() (unsigned i) { return m_vertices[i]; } - - bool contains(const Vector2& point); - - void affine_transform(const Matrix2x2& A, Vector2 b); - void operator *= (const Matrix2x2& A); - void operator += (const Vector2 b); - - private: - bool m_defined; - bool m_convex; - std::vector m_vertices; - bool _convex(); - }; // class Polygon - -} // namespace rovernav -#endif // _ROVERNAV_POLYGON_H_ diff --git a/kn/src/knMath/CMakeLists.txt b/kn/src/knMath/CMakeLists.txt index be60d93..326d63f 100644 --- a/kn/src/knMath/CMakeLists.txt +++ b/kn/src/knMath/CMakeLists.txt @@ -12,7 +12,6 @@ string( TOUPPER "${EXPORT}_BUILD_DLL" EXPORT_DEFINE ) set( SOURCES ATrans.cpp RotMat3d.cpp - Plane.cpp ) set( HEADERS @@ -25,7 +24,7 @@ set( HEADERS Quaternion.h RotMat3d.h Vector.h - Plane.h + Functions.h ) include_directories( diff --git a/kn/src/knMath/Functions.h b/kn/src/knMath/Functions.h index 7fe5f3d..934007a 100644 --- a/kn/src/knMath/Functions.h +++ b/kn/src/knMath/Functions.h @@ -27,6 +27,7 @@ namespace kn template inline int signum(T x, T epsilon = T(0)) { return (epsilon < x) - (x < epsilon); } + template inline void mod(T& x, T y) /*!< replace x by x mod y, extending C++ % to give valid results for all signs of x and y : diff --git a/kn/src/knMath/Plane.cpp b/kn/src/knMath/Plane.cpp deleted file mode 100644 index c5ddeff..0000000 --- a/kn/src/knMath/Plane.cpp +++ /dev/null @@ -1,333 +0,0 @@ -//========================================================================== -// -// File: Plane.cpp -// -// PROJECT: rovernav -// MODULE: travmap -// -// $Author: pedersen $ -// $Date: 2008-11-21 09:37:07 -0800 (Fri, 21 Nov 2008) $ -// $Revision: 2432 $ -// -// (c) Copyright NASA Ames Research Center. All rights reserved. -//=========================================================================== - -#include "Plane.h" -#include -#include - -namespace kn -{ - - using namespace std; - -/////////////////////////////////////////////////////////////////////// -// Plane -/// Construct plane represented by z = a*x + b*y + c -Plane::Plane(double a, double b, double c) : - m_A(a), m_B(b), m_C(c) -{} - -Plane::Plane(const Vector3& normal, const Vector3& origin) : - m_A(-normal.x()/normal.z()), - m_B(-normal.y()/normal.z()), - m_C(-m_A*origin.x() - m_B*origin.y() + origin.z()) -{} - -void Plane::clear() { - m_A = m_B = m_C = 0.0; -} - -void Plane::computeNormal(Vector3& normal) const { - normal.x() = -m_A; - normal.y() = -m_B; - normal.z() = 1.0; - normal /= normal.norm(); -} - -void Plane::computeGradient(double& gradient) const { - double x = sqrt(1/(1+ m_A*m_A)); - double y = sqrt(1/(1+ m_B*m_B)); - double Zxy = fabs(x*m_A + y*m_B); - - //get the slope of the line through this point and the origin - gradient = Zxy / sqrt(x*x + y*y); -} - -void Plane::computeRollPitch(double &roll, double &pitch, double yaw) - const { - double q, cy, sy; - - cy = cos(yaw); sy = sin(yaw); - q = sqrt(m_A*m_A + m_B*m_B + 1); - pitch = asin((m_B*cy - m_A*sy)/q); - roll = atan(-m_A*cy-m_B*sy); -} - -double Plane::height(double x, double y) const { - return m_A*x + m_B*y + m_C; -} - - -/////////////////////////////////////////////////////// -/////////////////////////////////////////////////////// - -PlaneFitMoments::PlaneFitMoments() : - m_numPoints(0), - m_weight(0.0), - Sx(0), Sy(0), Sz(0), - Sxx(0), Syy(0), Szz(0), Sxy(0), Sxz(0), Syz(0) -{ -} - -PlaneFitMoments::~PlaneFitMoments() -{ -} - -void PlaneFitMoments::addPoint(const Vector3& p) -{ - m_numPoints++; - m_weight++; - Sx += p.x(); - Sy += p.y(); - Sz += p.z(); - Sxx += (p.x()*p.x()); - Syy += (p.y()*p.y()); - Szz += (p.z()*p.z()); - Sxy += (p.x()*p.y()); - Sxz += (p.x()*p.z()); - Syz += (p.y()*p.z()); -} - -void PlaneFitMoments::clear() -{ - m_numPoints = 0; - m_weight = 0.0; - Sx = Sy = Sz = Sxx = Syy = Szz = Sxy = Sxz = Syz = 0.0; -} - -void PlaneFitMoments::computePlane(Plane& plane) const { - if (m_numPoints < 3.0) { - // TODO: better statistical test for sufficient data - plane.clear(); - } - else - { - double det = - Sx*(-(Syy*Sx) + Sxy*Sy) + - Sxy*( (Sy*Sx) - Sxy*m_weight) + - Sxx*(-(Sy*Sy) + Syy*m_weight); - - plane.A() = - (Sz * (-(Sx*Syy) + Sxy*Sy) + - Syz * ( (Sx*Sy) - Sxy*m_weight) + - Sxz * (-(Sy*Sy) + Syy*m_weight)) - /det; - - plane.B() = - (Sz * ( (Sx*Sxy) - Sxx*Sy) + - Syz * (-(Sx*Sx) + Sxx*m_weight) + - Sxz * ( (Sy*Sx) - Sxy*m_weight)) - /det; - - plane.C() = - (Sz * (-(Sxy*Sxy) + Sxx*Syy) + - Syz * ( (Sxy*Sx) - Sxx*Sy) + - Sxz * (-(Syy*Sx) + Sxy*Sy)) - /det; - } -} - -double PlaneFitMoments::getResidual(const Plane& plane) const -{ - double residual; - if (m_weight <= 0.0) - residual = 0.0; // TODO: better statistical test - else - { - /* SQR((Sz)-A(Sx)-B(Sy)-C(S))*/ - double A = plane.A(), B = plane.B(), C = plane.C(); - double chiSquared = - Szz + A*A*Sxx + B*B*Syy + C*C*m_weight - + 2*(A*(C*Sx - Sxz + B*Sxy)+ B*(C*Sy - Syz) - C*Sz); - - // sanity/numerical precision check - if (chiSquared < 0) { - // only print the message if it's really bad... - if (chiSquared <-1e-4) - cout << "WARNING! Chi Squared <0? ChiSquared = " - << chiSquared < -#include -#include "Vector.h" -#include "Matrix.h" - -namespace kn -{ - - - class Plane { - public: - /// Construct plane represented by z = a*x + b*y + c - Plane(double a = 0, double b = 0, double c = 0); - Plane(const Vector3& normal, const Vector3& origin); - ~Plane() {}; - void clear(); - - Vector3 getNormal() const { Vector3 temp; computeNormal(temp); return temp; } - void computeNormal(Vector3& normal) const; - void computeGradient(double& gradient) const; - void computeRollPitch(double& roll, double& pitch, double yaw = 0) const; - - double height(double x, double y) const; - - friend std::ostream& operator << (std::ostream& o, - const Plane& rhs) { - return (o << std::setprecision(2) << std::setw(3) - << "(" << rhs.A() << " " - << rhs.B() << " " - << rhs.C()) << ")"; - } - - inline const double& A() const { return m_A; } - inline const double& B() const { return m_B; } - inline const double& C() const { return m_C; } - - inline double& A() { return m_A; } - inline double& B() { return m_B; } - inline double& C() { return m_C; } - - private: - double m_A, m_B, m_C; - }; // class Plane - - ///////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - - class PlaneFitMoments { - public: - PlaneFitMoments(); - ~PlaneFitMoments(); - - void addPoint(const Vector3& p); - void clear(); - - /*! Compute best fit plane (minizing error in z) */ - Plane getPlane() const { Plane temp; computePlane(temp); return temp; } - void computePlane(Plane& plane) const; - - /*! mean residual chi^2 error ((z - plane.height(x,y))^2) between - @param plane and points in plane fit moments */ - double getResidual(const Plane& plane) const; - - double meanHeight() const; - bool computeMean(Vector3& mean) const; - - double heightVariance() const; - bool computeCovariance(Matrix3x3& cov) const; - - /*! cumulative weight */ - inline int numPoints() const { return m_numPoints ; } - inline double weight() const { return m_weight; } - - void operator+=(const PlaneFitMoments& rhs); - void operator-=(const PlaneFitMoments& rhs); - PlaneFitMoments operator-(const PlaneFitMoments& rhs) const; - PlaneFitMoments operator+(const PlaneFitMoments& rhs) const; - - void operator *= (double rhs); - void operator /= (double rhs); - PlaneFitMoments operator * (double rhs) const; - PlaneFitMoments operator / (double rhs) const; - - private: - int m_numPoints; - double m_weight; - double Sx, Sy, Sz, Sxx, Syy, Szz, Sxy, Sxz, Syz; - }; // class PlaneFitMoments - -} // namespace rovernav -#endif - - From 95ba88aa04f082ee0e9e569bf6c776cf0aabc13c Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 14 Sep 2018 13:40:47 -0700 Subject: [PATCH 80/90] Moving helpers from rovernav to kn (#8) * Moving helpers from rovernav to kn * More tweaks from unforking builds * Minimize imports --- kn/src/knMath/CMakeLists.txt | 1 + kn/src/knMath/Functions.h | 64 ++++++++++++++++++++++++++++ kn/src/knMath/Vector.h | 2 + kn/src/knShare/Array2DView.cpp | 4 +- kn/src/knShare/Array2DView.h | 6 +-- kn/src/knShare/Time.h | 14 ++++++ knRapid/src/CMakeLists.txt | 4 +- knRapid/src/knRaft/FileAnnouncer.cpp | 4 +- 8 files changed, 90 insertions(+), 9 deletions(-) create mode 100644 kn/src/knMath/Functions.h diff --git a/kn/src/knMath/CMakeLists.txt b/kn/src/knMath/CMakeLists.txt index 6326e94..326d63f 100644 --- a/kn/src/knMath/CMakeLists.txt +++ b/kn/src/knMath/CMakeLists.txt @@ -24,6 +24,7 @@ set( HEADERS Quaternion.h RotMat3d.h Vector.h + Functions.h ) include_directories( diff --git a/kn/src/knMath/Functions.h b/kn/src/knMath/Functions.h new file mode 100644 index 0000000..934007a --- /dev/null +++ b/kn/src/knMath/Functions.h @@ -0,0 +1,64 @@ +//========================================================================== +// +// File: Functions.h +// +// PROJECT: kn +// +// $Author: pedersen $ +// $Date: July 2008 $ +// $Revision: $ +// +// (c) Copyright NASA Ames Research Center. All rights reserved. +//=========================================================================== + +#ifndef kn_Functions_h +#define kn_Functions_h + +#include + +namespace kn +{ + template + inline T degrees(T x) { return x * 180.0 / M_PI; } + + template + inline T radians(T x) { return x * M_PI / 180.0; } + + template + inline int signum(T x, T epsilon = T(0)) { return (epsilon < x) - (x < epsilon); } + + template + inline void mod(T& x, T y) + /*!< replace x by x mod y, extending C++ % to give valid + results for all signs of x and y : + By convention: + mod(x, y) has same sign as y. + x mod 0 is undefined. + x < 0 ==> mod(x,y) in [0,y) + x%y in (-abs(y),0] + + This guarantees that mod(x,y) is always a valid + index for example. + */ + { + x %= y; + if ((x < 0 && y > 0) || (y < 0 && x > 0)) + x += y; + } + + template + inline T sqr(T x) { return x*x; }; + + template + inline T cube(T x) { return x*x*x; }; + + template + inline T mean(T a,T2 b) { return (a+(T)b)/2; }; + + template + inline A linear_scale(A value, B min, C max) + { + return (value <= min ? 0 : value >= max ? 1 : (value-min)/(max-min)); + } +} +#endif // kn_Functions_h diff --git a/kn/src/knMath/Vector.h b/kn/src/knMath/Vector.h index 452f884..10e58ab 100644 --- a/kn/src/knMath/Vector.h +++ b/kn/src/knMath/Vector.h @@ -36,6 +36,8 @@ namespace kn * to a number of "obviously preferred ones. */ + typedef Eigen::VectorXd Vector; + /** @ingroup knMath */ typedef Eigen::Vector3d Vector3; /** @ingroup knMath */ diff --git a/kn/src/knShare/Array2DView.cpp b/kn/src/knShare/Array2DView.cpp index 0e62b10..748c184 100644 --- a/kn/src/knShare/Array2DView.cpp +++ b/kn/src/knShare/Array2DView.cpp @@ -47,7 +47,7 @@ namespace kn m_sizeX(0), m_sizeY(0) { - set_size(x, y); + resize(x, y); } int @@ -67,7 +67,7 @@ namespace kn } void - Array2DViewBase::set_size(size_t x, size_t y) + Array2DViewBase::resize(size_t x, size_t y) { if (x != m_sizeX || y != m_sizeY) { diff --git a/kn/src/knShare/Array2DView.h b/kn/src/knShare/Array2DView.h index 36a2e13..d2ce998 100644 --- a/kn/src/knShare/Array2DView.h +++ b/kn/src/knShare/Array2DView.h @@ -71,7 +71,7 @@ namespace kn static int iLog2(int x); protected: - void set_size(size_t x, size_t y); + void resize(size_t x, size_t y); private: size_t m_sizeX; @@ -125,9 +125,9 @@ namespace kn return m_cells[index(x, y)]; } - void set_size(size_t x, size_t y) { + void resize(size_t x, size_t y) { if (x != sizeX() || y != sizeY()) { - Array2DViewBase::set_size(x, y); + Array2DViewBase::resize(x, y); if (x > 0 && y > 0) { m_cells.reset(new Cell[numCells()]); } diff --git a/kn/src/knShare/Time.h b/kn/src/knShare/Time.h index e385efa..9601a49 100644 --- a/kn/src/knShare/Time.h +++ b/kn/src/knShare/Time.h @@ -69,6 +69,20 @@ namespace kn friend knShare_Export std::ostream& operator<<(std::ostream& ostr, Time6 const& timestamp); }; + + inline double tv2d(TimePoint const& time) + { + duration durationInSeconds(time.time_since_epoch()); + + return durationInSeconds.count(); + } + inline double tv2d(Duration const& d) + { + duration durationInSeconds(d); + + return durationInSeconds.count(); + } + } #endif diff --git a/knRapid/src/CMakeLists.txt b/knRapid/src/CMakeLists.txt index c2be641..57e98bb 100644 --- a/knRapid/src/CMakeLists.txt +++ b/knRapid/src/CMakeLists.txt @@ -16,8 +16,8 @@ add_build_switch( rapidFrameStore KNRAPID_HAS_DDS AND EIGEN3_FOUND) add_build_switch( knFrameStoreSvc KNRAPID_HAS_DDS AND EIGEN3_FOUND ) add_build_switch( knSystemInfo NOT APPLE AND UNIX ) add_build_switch( knSystemInfoSvc KNRAPID_HAS_DDS AND KNRAPID_BUILD_knSystemInfo ) -add_build_switch( knFetchPool QT_FOUND ) -add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding AND IRGUTIL_irgSha1_LIBRARY AND KNRAPID_BUILD_knFetchPool ) +add_subdirectory( knFetchPool ) +add_build_switch( knRaft KNRAPID_BUILD_rapidCommanding ) add_build_switch( knProcessManager KNRAPID_HAS_DDS AND UNIX ) diff --git a/knRapid/src/knRaft/FileAnnouncer.cpp b/knRapid/src/knRaft/FileAnnouncer.cpp index aaf42d7..160267d 100644 --- a/knRapid/src/knRaft/FileAnnouncer.cpp +++ b/knRapid/src/knRaft/FileAnnouncer.cpp @@ -93,11 +93,11 @@ FileAnnouncer::announceFile(const char* path, } m_publisher->sendEvent(); - return TRUE; + return true; } KN_ERROR_OSTR("FileAnnouncer: file \"" << path << "\" is invalid: exists=" << fi.exists() << ", isFile=" << fi.isFile() << ", isReadable=" << fi.isReadable()); - return FALSE; + return false; } From af0ec2ede42ddcc2a855e682da5a9403cfe3c6da Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 9 Oct 2018 11:30:47 -0700 Subject: [PATCH 81/90] add frame_id to Marker type --- knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl diff --git a/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl old mode 100644 new mode 100755 index c4e4252..c46e8e5 --- a/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl +++ b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl @@ -39,6 +39,9 @@ module rapid { //@copy-declaration /** Direct copy of ROS type */ struct Marker { + //@copy /** tf frame name because RAPID header does not specify frame name */ + String32 frame_id; + //@copy /** Namespace to place this object in... used in conjunction with id to create a unique name for the object */ String32 ns; @@ -83,7 +86,7 @@ module rapid { boolean mesh_use_embedded_materials; }; - typedef sequence MarkerArraySequence8; + typedef sequence MarkerArraySequence; //@copy-c-declaration class RosMarkerArraySampleTypeSupport; //@copy-c-declaration class RosMarkerArraySampleDataWriter; @@ -103,7 +106,7 @@ module rapid { //@copy-c-declaration #endif //@copy-c-declaration typedef RosMarkerArraySample Type; - public MarkerArraySequence8 marker_array; + public MarkerArraySequence marker_array; }; }; }; From 3c08d977ff9c0e8327460f88052793b4d5d3f48d Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 8 Nov 2018 11:39:03 -0800 Subject: [PATCH 82/90] Replace veradic template standin for signals2 --- kn/src/knShare/StateMachine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kn/src/knShare/StateMachine.h b/kn/src/knShare/StateMachine.h index 8a7770e..9dcbd5f 100644 --- a/kn/src/knShare/StateMachine.h +++ b/kn/src/knShare/StateMachine.h @@ -95,7 +95,7 @@ namespace kn int eventIdx(std::string const& event) const; }; - typedef boost::signals2::signal5 TransitionSignal; + typedef boost::signals2::signal TransitionSignal; StateMachine(std::string const& name = "Subsystem"); virtual ~StateMachine() throw(); From 3d446090c175ef1803a1ec3a64d4180dc73ddc9d Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 29 Nov 2018 11:33:04 -0800 Subject: [PATCH 83/90] Remove local Qt include paths Those paths were picking up the wrong Qt version. With the multiple-versions installed on 16.04 & 18.04 this path cleanup has to be better controlled. That's why it is pooled in the top-level CMakeLists.txt --- knDds/src/knDds/CMakeLists.txt | 3 --- knDds/src/knDdsTools/ddsDomainInfo/CMakeLists.txt | 5 ----- knDds/src/knDdsUtil/CMakeLists.txt | 3 --- knRapid/examples/poseProvider/CMakeLists.txt | 3 --- knRapid/src/knFetchPool/CMakeLists.txt | 4 ---- knRapid/src/knFrameStoreSvc/CMakeLists.txt | 4 ---- knRapid/src/knProcessManager/CMakeLists.txt | 3 --- knRapid/src/knRaft/CMakeLists.txt | 3 --- knRapid/src/knSystemInfoSvc/CMakeLists.txt | 4 ---- knRapid/src/rapidCommanding/CMakeLists.txt | 3 --- knRapid/src/rapidExtArcIo/CMakeLists.txt | 3 --- knRapid/src/rapidExtIo/CMakeLists.txt | 3 --- knRapid/src/rapidExtTraclabsIo/CMakeLists.txt | 3 --- knRapid/src/rapidFrameStore/CMakeLists.txt | 4 ---- knRapid/src/rapidIo/CMakeLists.txt | 3 --- knRapid/src/rapidTools/genericCommandGui/CMakeLists.txt | 5 ----- knRapid/src/rapidTools/imageSensorSampleGui/CMakeLists.txt | 4 ---- knRapid/src/rapidTools/rapidLogTools/CMakeLists.txt | 2 -- .../rapidTools/rapidLogTools/rapidLogReader/CMakeLists.txt | 2 -- knRapid/src/rapidUtil/CMakeLists.txt | 3 --- 20 files changed, 67 deletions(-) diff --git a/knDds/src/knDds/CMakeLists.txt b/knDds/src/knDds/CMakeLists.txt index 478980f..3ba7d7f 100644 --- a/knDds/src/knDds/CMakeLists.txt +++ b/knDds/src/knDds/CMakeLists.txt @@ -50,9 +50,6 @@ add_library( ${LIB_NAME} SHARED include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${RAPID_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ) diff --git a/knDds/src/knDdsTools/ddsDomainInfo/CMakeLists.txt b/knDds/src/knDdsTools/ddsDomainInfo/CMakeLists.txt index 9f62cd7..fd53814 100644 --- a/knDds/src/knDdsTools/ddsDomainInfo/CMakeLists.txt +++ b/knDds/src/knDdsTools/ddsDomainInfo/CMakeLists.txt @@ -24,11 +24,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTNETWORK_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ) diff --git a/knDds/src/knDdsUtil/CMakeLists.txt b/knDds/src/knDdsUtil/CMakeLists.txt index c7c87b8..84cc614 100644 --- a/knDds/src/knDdsUtil/CMakeLists.txt +++ b/knDds/src/knDdsUtil/CMakeLists.txt @@ -22,9 +22,6 @@ include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ) link_libraries( diff --git a/knRapid/examples/poseProvider/CMakeLists.txt b/knRapid/examples/poseProvider/CMakeLists.txt index 7bc907c..20331e9 100644 --- a/knRapid/examples/poseProvider/CMakeLists.txt +++ b/knRapid/examples/poseProvider/CMakeLists.txt @@ -14,9 +14,6 @@ include_directories( ${Boost_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ) link_libraries( diff --git a/knRapid/src/knFetchPool/CMakeLists.txt b/knRapid/src/knFetchPool/CMakeLists.txt index add15f1..98d691a 100644 --- a/knRapid/src/knFetchPool/CMakeLists.txt +++ b/knRapid/src/knFetchPool/CMakeLists.txt @@ -34,10 +34,6 @@ endif( CURL_FOUND AND CURL_HAS_SSH ) include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KN_INCLUDE_DIR} ) diff --git a/knRapid/src/knFrameStoreSvc/CMakeLists.txt b/knRapid/src/knFrameStoreSvc/CMakeLists.txt index 21ed6e9..dd2e38d 100644 --- a/knRapid/src/knFrameStoreSvc/CMakeLists.txt +++ b/knRapid/src/knFrameStoreSvc/CMakeLists.txt @@ -27,10 +27,6 @@ include_directories ( ${EIGEN3_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${ACE_INCLUDE_DIR} ) diff --git a/knRapid/src/knProcessManager/CMakeLists.txt b/knRapid/src/knProcessManager/CMakeLists.txt index b35a57b..5b34923 100644 --- a/knRapid/src/knProcessManager/CMakeLists.txt +++ b/knRapid/src/knProcessManager/CMakeLists.txt @@ -35,9 +35,6 @@ include_directories ( ${RTIDDS_INCLUDE_DIR} ${KN_INCLUDE_DIR} ${Boost_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../rapidDds ) diff --git a/knRapid/src/knRaft/CMakeLists.txt b/knRapid/src/knRaft/CMakeLists.txt index bf3cb74..ed59c45 100644 --- a/knRapid/src/knRaft/CMakeLists.txt +++ b/knRapid/src/knRaft/CMakeLists.txt @@ -34,9 +34,6 @@ include_directories( ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ) link_directories( ${Boost_LIBRARY_DIRS} ) diff --git a/knRapid/src/knSystemInfoSvc/CMakeLists.txt b/knRapid/src/knSystemInfoSvc/CMakeLists.txt index 5a2aee0..c691188 100644 --- a/knRapid/src/knSystemInfoSvc/CMakeLists.txt +++ b/knRapid/src/knSystemInfoSvc/CMakeLists.txt @@ -28,10 +28,6 @@ include_directories( ${ACE_INCLUDE_DIR} ${KN_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ) diff --git a/knRapid/src/rapidCommanding/CMakeLists.txt b/knRapid/src/rapidCommanding/CMakeLists.txt index b8f714e..2e33881 100644 --- a/knRapid/src/rapidCommanding/CMakeLists.txt +++ b/knRapid/src/rapidCommanding/CMakeLists.txt @@ -45,9 +45,6 @@ include_directories( ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ) # there's some wicked weird black magic going on w/ boost diff --git a/knRapid/src/rapidExtArcIo/CMakeLists.txt b/knRapid/src/rapidExtArcIo/CMakeLists.txt index 0b40e6c..c0d1d53 100644 --- a/knRapid/src/rapidExtArcIo/CMakeLists.txt +++ b/knRapid/src/rapidExtArcIo/CMakeLists.txt @@ -52,9 +52,6 @@ set( SOURCES include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} diff --git a/knRapid/src/rapidExtIo/CMakeLists.txt b/knRapid/src/rapidExtIo/CMakeLists.txt index aff816d..22e5805 100644 --- a/knRapid/src/rapidExtIo/CMakeLists.txt +++ b/knRapid/src/rapidExtIo/CMakeLists.txt @@ -50,9 +50,6 @@ set( SOURCES include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} diff --git a/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt b/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt index b39f379..54d1f1e 100644 --- a/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt +++ b/knRapid/src/rapidExtTraclabsIo/CMakeLists.txt @@ -24,9 +24,6 @@ set( SOURCES include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} diff --git a/knRapid/src/rapidFrameStore/CMakeLists.txt b/knRapid/src/rapidFrameStore/CMakeLists.txt index cb69532..ae769b7 100644 --- a/knRapid/src/rapidFrameStore/CMakeLists.txt +++ b/knRapid/src/rapidFrameStore/CMakeLists.txt @@ -25,10 +25,6 @@ set( SOURCES include_directories ( ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${ACE_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIR} diff --git a/knRapid/src/rapidIo/CMakeLists.txt b/knRapid/src/rapidIo/CMakeLists.txt index 2dfe278..95cf76c 100644 --- a/knRapid/src/rapidIo/CMakeLists.txt +++ b/knRapid/src/rapidIo/CMakeLists.txt @@ -56,9 +56,6 @@ set( SOURCES include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${KNDDS_INCLUDE_DIR} diff --git a/knRapid/src/rapidTools/genericCommandGui/CMakeLists.txt b/knRapid/src/rapidTools/genericCommandGui/CMakeLists.txt index 8c508e7..0ade075 100644 --- a/knRapid/src/rapidTools/genericCommandGui/CMakeLists.txt +++ b/knRapid/src/rapidTools/genericCommandGui/CMakeLists.txt @@ -55,11 +55,6 @@ qt4_wrap_cpp(MOC_FILES ${MOC_HEADERS}) include_directories( ${CMAKE_CURRENT_BINARY_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTNETWORK_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} diff --git a/knRapid/src/rapidTools/imageSensorSampleGui/CMakeLists.txt b/knRapid/src/rapidTools/imageSensorSampleGui/CMakeLists.txt index 887dfac..da14f4b 100644 --- a/knRapid/src/rapidTools/imageSensorSampleGui/CMakeLists.txt +++ b/knRapid/src/rapidTools/imageSensorSampleGui/CMakeLists.txt @@ -25,10 +25,6 @@ qt4_wrap_cpp(MOC_FILES ${MOC_HEADERS}) include_directories( ${CMAKE_CURRENT_BINARY_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} diff --git a/knRapid/src/rapidTools/rapidLogTools/CMakeLists.txt b/knRapid/src/rapidTools/rapidLogTools/CMakeLists.txt index cbc16ff..3b6414c 100644 --- a/knRapid/src/rapidTools/rapidLogTools/CMakeLists.txt +++ b/knRapid/src/rapidTools/rapidLogTools/CMakeLists.txt @@ -9,8 +9,6 @@ set(HEADERS include_directories( ${IRGUTIL_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${KNRAPID_INCLUDE_DIR} ) diff --git a/knRapid/src/rapidTools/rapidLogTools/rapidLogReader/CMakeLists.txt b/knRapid/src/rapidTools/rapidLogTools/rapidLogReader/CMakeLists.txt index f89bac3..f6e14d2 100644 --- a/knRapid/src/rapidTools/rapidLogTools/rapidLogReader/CMakeLists.txt +++ b/knRapid/src/rapidTools/rapidLogTools/rapidLogReader/CMakeLists.txt @@ -26,8 +26,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../../../rapidDds ${Boost_INCLUDE_DIR} ${RTIDDS_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ) link_libraries( diff --git a/knRapid/src/rapidUtil/CMakeLists.txt b/knRapid/src/rapidUtil/CMakeLists.txt index 506c85a..d357c49 100644 --- a/knRapid/src/rapidUtil/CMakeLists.txt +++ b/knRapid/src/rapidUtil/CMakeLists.txt @@ -32,9 +32,6 @@ set( SOURCES include_directories( ${ACE_INCLUDE_DIR} ${MIRO_INCLUDE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ) From 962ca5672885a12c258d7b8e8ad8718f2161dd13 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Fri, 7 Dec 2018 14:44:22 -0800 Subject: [PATCH 84/90] Refine Qt components list --- knRapid/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/knRapid/CMakeLists.txt b/knRapid/CMakeLists.txt index 4555c24..3322fce 100644 --- a/knRapid/CMakeLists.txt +++ b/knRapid/CMakeLists.txt @@ -63,20 +63,24 @@ if( MIRO_BUILD_WITH_QT5 ) message(STATUS "FOUND QT 5") find_package(Qt5Widgets REQUIRED) find_package(Qt5Xml REQUIRED) + find_package(Qt5Network REQUIRED) if (Qt5_POSITION_INDEPENDENT_CODE) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() include_directories(SYSTEM "${Qt5Widgets_INCLUDE_DIRS}") include_directories(SYSTEM "${Qt5Xml_INCLUDE_DIRS}") + include_directories(SYSTEM "${Qt5Network_INCLUDE_DIRS}") set(QT_QTXML_LIBRARY Qt5::Xml) set(QT_QTCORE_LIBRARY Qt5::Widgets) + set(QT_QTNETWORK_LIBRARY Qt5::Network) else() message(STATUS "FOUND QT 4") - find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) + find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) include(${QT_USE_FILE}) include_directories(SYSTEM "${QT_INCLUDE_DIR}") include_directories(SYSTEM "${QT_QTXML_INCLUDE_DIR}") include_directories(SYSTEM "${QT_QTCORE_INCLUDE_DIR}") + include_directories(SYSTEM "${QT_QTNETWORK_INCLUDE_DIR}") endif() find_package( ACE ) From f781ff4408b9d8d6078c6bee3f86a16c48c64031 Mon Sep 17 00:00:00 2001 From: Julius Date: Tue, 6 Nov 2018 11:46:47 -0800 Subject: [PATCH 85/90] Added rotation to image stream subsystem --- knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl index ec477a8..46c7607 100644 --- a/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl +++ b/knRapid/src/rapidExtArcDds/ExtArcCommandConstants.idl @@ -149,6 +149,10 @@ module rapid { const String32 IMGSTREAM_METHOD_setSaveImages_PARAM_saveImages = "saveImages"; const DataType IMGSTREAM_METHOD_setSaveImages_DTYPE_saveImages = RAPID_BOOL; + const String32 IMGSTREAM_METHOD_setRotationAngle = "setRotationAngle"; + const String32 IMGSTREAM_METHOD_setRotationAngle_PARAM_rotationAngle = "rotationAngle"; + const DataType IMGSTREAM_METHOD_setRotationAngle_DTYPE_rotationAngle = RAPID_INT; + const String32 IMGSTREAM_METHOD_reconnect = "reconnect"; From e4ac3b58fb0cec1f8d75ff3571e4c5a41cc60f50 Mon Sep 17 00:00:00 2001 From: mallanmba Date: Tue, 9 Oct 2018 11:30:47 -0700 Subject: [PATCH 86/90] add frame_id to Marker type --- knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl diff --git a/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl old mode 100644 new mode 100755 index c4e4252..c46e8e5 --- a/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl +++ b/knRapid/src/rapidExtArcDds/RosMarkerArraySample.idl @@ -39,6 +39,9 @@ module rapid { //@copy-declaration /** Direct copy of ROS type */ struct Marker { + //@copy /** tf frame name because RAPID header does not specify frame name */ + String32 frame_id; + //@copy /** Namespace to place this object in... used in conjunction with id to create a unique name for the object */ String32 ns; @@ -83,7 +86,7 @@ module rapid { boolean mesh_use_embedded_materials; }; - typedef sequence MarkerArraySequence8; + typedef sequence MarkerArraySequence; //@copy-c-declaration class RosMarkerArraySampleTypeSupport; //@copy-c-declaration class RosMarkerArraySampleDataWriter; @@ -103,7 +106,7 @@ module rapid { //@copy-c-declaration #endif //@copy-c-declaration typedef RosMarkerArraySample Type; - public MarkerArraySequence8 marker_array; + public MarkerArraySequence marker_array; }; }; }; From 1f28e8535dfd314b24e4df055565f9d78bf68566 Mon Sep 17 00:00:00 2001 From: Julius Date: Thu, 28 Mar 2019 15:47:37 -0700 Subject: [PATCH 87/90] Added rotation angle key to image metadata --- knRapid/src/rapidDds/ImageMetadata.idl | 1 + 1 file changed, 1 insertion(+) diff --git a/knRapid/src/rapidDds/ImageMetadata.idl b/knRapid/src/rapidDds/ImageMetadata.idl index d79603e..f408c28 100644 --- a/knRapid/src/rapidDds/ImageMetadata.idl +++ b/knRapid/src/rapidDds/ImageMetadata.idl @@ -26,6 +26,7 @@ module rapid { const String32 IMG_CROP_H_KEY = "CROP_HEIGHT"; const String32 IMG_JPEG_Q_KEY = "JPEG_QUALITY"; const String32 IMG_MIN_SEP_KEY = "MIN_SEPARATION"; + const String32 IMG_ROT_ANG_KEY = "ROT_ANGLE"; //@copy-declaration /** //@copy-declaration * Holds status information for an image sensor - typically a camera, but could be a laser scanner, gpr, or From 072c289f60e8105857d2aa9d65cbc986d8a2f058 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Wed, 15 May 2019 06:57:25 -0700 Subject: [PATCH 88/90] Fix static template member instantiation once more Adding ACE macros for explicit static template member instantiation. --- kn/src/knFrameStore/FrameStoreSingleton.cpp | 4 +--- kn/src/knShare/StateMachineRepository.cpp | 5 +---- kn/src/knShare/tests/libknC/libC.cpp | 16 +++------------- knDds/src/knDds/DdsEntityRepositories.cpp | 4 ++++ knDds/src/knDds/DdsTypeRegistrator.cpp | 2 ++ .../rapidCommanding/RapidSubsystemRepository.cpp | 5 +---- knRapid/src/rapidIo/TextMessager.cpp | 7 +++---- 7 files changed, 15 insertions(+), 28 deletions(-) diff --git a/kn/src/knFrameStore/FrameStoreSingleton.cpp b/kn/src/knFrameStore/FrameStoreSingleton.cpp index 17db116..022ca14 100644 --- a/kn/src/knFrameStore/FrameStoreSingleton.cpp +++ b/kn/src/knFrameStore/FrameStoreSingleton.cpp @@ -23,7 +23,5 @@ namespace kn Singleton FrameStoreSingleton::instance; } -#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) -template kn::Singleton * kn::Singleton ::s_instance; -#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton) diff --git a/kn/src/knShare/StateMachineRepository.cpp b/kn/src/knShare/StateMachineRepository.cpp index 8b8feca..d1d3870 100644 --- a/kn/src/knShare/StateMachineRepository.cpp +++ b/kn/src/knShare/StateMachineRepository.cpp @@ -18,7 +18,4 @@ ******************************************************************************/ #include "StateMachineRepository.h" -// does this evaluate to true on any of our target platforms? -#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) -template kn::Singleton * kn::Singleton::s_instance_; -#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton >); diff --git a/kn/src/knShare/tests/libknC/libC.cpp b/kn/src/knShare/tests/libknC/libC.cpp index 37c4061..e9e0f88 100644 --- a/kn/src/knShare/tests/libknC/libC.cpp +++ b/kn/src/knShare/tests/libknC/libC.cpp @@ -29,17 +29,7 @@ struct Bar Bar bar; -// From ace/README: -//ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION -// For the GCC compiler -// on AIX, HPUX and VxWorks we have to -// explicitly instantiate static template -// members else we get multiple instances -// of the same static. -#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) - template kn::Singleton * kn::Singleton::s_instance; - template kn::Singleton * kn::Singleton::s_instance; - template kn::Singleton > * - kn::Singleton >::s_instance; -#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); diff --git a/knDds/src/knDds/DdsEntityRepositories.cpp b/knDds/src/knDds/DdsEntityRepositories.cpp index 4bf70d6..090d433 100644 --- a/knDds/src/knDds/DdsEntityRepositories.cpp +++ b/knDds/src/knDds/DdsEntityRepositories.cpp @@ -269,3 +269,7 @@ namespace kn throw ENotRegistered(name); } } + +ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsDomainParticipantRepository, ACE_SYNCH_RECURSIVE_MUTEX); +ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsPublisherRepository, ACE_SYNCH_RECURSIVE_MUTEX); +ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsSubscriberRepository, ACE_SYNCH_RECURSIVE_MUTEX); diff --git a/knDds/src/knDds/DdsTypeRegistrator.cpp b/knDds/src/knDds/DdsTypeRegistrator.cpp index 04ba2b5..c3c2143 100644 --- a/knDds/src/knDds/DdsTypeRegistrator.cpp +++ b/knDds/src/knDds/DdsTypeRegistrator.cpp @@ -24,3 +24,5 @@ namespace kn {} } +ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, kn::DdsTypeRegistratorRepository, ACE_SYNCH_RECURSIVE_MUTEX); + diff --git a/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp b/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp index ef85f41..ccf3983 100644 --- a/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp +++ b/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp @@ -1,6 +1,3 @@ #include "RapidSubsystemRepository.h" -// does this evaluate to true on any of our target platforms? -#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) -template kn::Singleton * kn::Singleton::s_instance; -#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Repository); diff --git a/knRapid/src/rapidIo/TextMessager.cpp b/knRapid/src/rapidIo/TextMessager.cpp index 278cba5..494719e 100644 --- a/knRapid/src/rapidIo/TextMessager.cpp +++ b/knRapid/src/rapidIo/TextMessager.cpp @@ -62,8 +62,7 @@ TextMessager::sendText(const char* category, m_publisher->sendEvent(); } -#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) -template kn::Singleton * kn::Singleton::s_instance_; -#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ - } +ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); + + From 6d1ae23fb1760c80c9bb1987dd749a6203073c89 Mon Sep 17 00:00:00 2001 From: Hans Utz Date: Thu, 16 May 2019 10:32:15 -0700 Subject: [PATCH 89/90] Add backward compability macros for 14.04 ACE version --- kn/src/knFrameStore/FrameStoreSingleton.cpp | 2 +- kn/src/knShare/Singleton.h | 13 +++++++++++++ kn/src/knShare/StateMachineRepository.cpp | 2 +- kn/src/knShare/tests/libknC/libC.cpp | 6 +++--- knDds/src/knDds/DdsEntityRepositories.cpp | 8 +++++--- knDds/src/knDds/DdsTypeRegistrator.cpp | 4 +++- .../rapidCommanding/RapidSubsystemRepository.cpp | 2 +- knRapid/src/rapidIo/TextMessager.cpp | 2 +- 8 files changed, 28 insertions(+), 11 deletions(-) diff --git a/kn/src/knFrameStore/FrameStoreSingleton.cpp b/kn/src/knFrameStore/FrameStoreSingleton.cpp index 022ca14..4533fc9 100644 --- a/kn/src/knFrameStore/FrameStoreSingleton.cpp +++ b/kn/src/knFrameStore/FrameStoreSingleton.cpp @@ -23,5 +23,5 @@ namespace kn Singleton FrameStoreSingleton::instance; } -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton) +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton) diff --git a/kn/src/knShare/Singleton.h b/kn/src/knShare/Singleton.h index 5df2a64..c6fcb26 100644 --- a/kn/src/knShare/Singleton.h +++ b/kn/src/knShare/Singleton.h @@ -24,6 +24,19 @@ #include "SmartPtr.h" #include "Mutex.h" +#ifdef ACE_SINGLETON_TEMPLATE_INSTANTIATE +# define KN_SINGLETON_TEMPLATE_INSTANTIATE(SINGLETON_TYPE, CLASS, LOCK) \ + ACE_SINGLETON_TEMPLATE_INSTANTIATE(SINGLETON_TYPE, CLASS, LOCK) +#else +#define KN_SINGLETON_TEMPLATE_INSTANTIATE(SINGLETON_TYPE, CLASS, LOCK) +#endif + +#ifdef ACE_SINGLETON_TEMPLATE_INSTANTIATION +# define KN_SINGLETON_TEMPLATE_INSTANTIATION(T) \ + ACE_SINGLETON_TEMPLATE_INSTANTIATION(T) +#else +# define KN_SINGLETON_TEMPLATE_INSTANTIATION(T) +#endif /** @defgroup knShare Shared * diff --git a/kn/src/knShare/StateMachineRepository.cpp b/kn/src/knShare/StateMachineRepository.cpp index d1d3870..20bf108 100644 --- a/kn/src/knShare/StateMachineRepository.cpp +++ b/kn/src/knShare/StateMachineRepository.cpp @@ -18,4 +18,4 @@ ******************************************************************************/ #include "StateMachineRepository.h" -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton >); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton >); diff --git a/kn/src/knShare/tests/libknC/libC.cpp b/kn/src/knShare/tests/libknC/libC.cpp index e9e0f88..6894ca9 100644 --- a/kn/src/knShare/tests/libknC/libC.cpp +++ b/kn/src/knShare/tests/libknC/libC.cpp @@ -30,6 +30,6 @@ struct Bar Bar bar; -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); diff --git a/knDds/src/knDds/DdsEntityRepositories.cpp b/knDds/src/knDds/DdsEntityRepositories.cpp index 090d433..7e3d456 100644 --- a/knDds/src/knDds/DdsEntityRepositories.cpp +++ b/knDds/src/knDds/DdsEntityRepositories.cpp @@ -19,6 +19,8 @@ #include "DdsEntityRepositories.h" #include "DdsSupport.h" +#include "knShare/Singleton.h" + #include "miro/Log.h" namespace kn @@ -269,7 +271,7 @@ namespace kn throw ENotRegistered(name); } } +KN_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsDomainParticipantRepository, ACE_SYNCH_RECURSIVE_MUTEX); -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsDomainParticipantRepository, ACE_SYNCH_RECURSIVE_MUTEX); -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsPublisherRepository, ACE_SYNCH_RECURSIVE_MUTEX); -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsSubscriberRepository, ACE_SYNCH_RECURSIVE_MUTEX); +KN_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsPublisherRepository, ACE_SYNCH_RECURSIVE_MUTEX); +KN_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Unmanaged_Singleton, kn::DdsSubscriberRepository, ACE_SYNCH_RECURSIVE_MUTEX); diff --git a/knDds/src/knDds/DdsTypeRegistrator.cpp b/knDds/src/knDds/DdsTypeRegistrator.cpp index c3c2143..0a8283a 100644 --- a/knDds/src/knDds/DdsTypeRegistrator.cpp +++ b/knDds/src/knDds/DdsTypeRegistrator.cpp @@ -18,11 +18,13 @@ ******************************************************************************/ #include "DdsTypeRegistrator.h" +#include "knShare/Singleton.h" + namespace kn { DdsTypeRegistratorBase::~DdsTypeRegistratorBase() throw() {} } -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, kn::DdsTypeRegistratorRepository, ACE_SYNCH_RECURSIVE_MUTEX); +KN_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, kn::DdsTypeRegistratorRepository, ACE_SYNCH_RECURSIVE_MUTEX); diff --git a/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp b/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp index ccf3983..04c9812 100644 --- a/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp +++ b/knRapid/src/rapidCommanding/RapidSubsystemRepository.cpp @@ -1,3 +1,3 @@ #include "RapidSubsystemRepository.h" -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Repository); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Repository); diff --git a/knRapid/src/rapidIo/TextMessager.cpp b/knRapid/src/rapidIo/TextMessager.cpp index 494719e..a1b15a4 100644 --- a/knRapid/src/rapidIo/TextMessager.cpp +++ b/knRapid/src/rapidIo/TextMessager.cpp @@ -63,6 +63,6 @@ TextMessager::sendText(const char* category, } } -ACE_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); +KN_SINGLETON_TEMPLATE_INSTANTIATION(kn::Singleton); From 8b59409f2a240faddbc684d508a9cbec648a7ba7 Mon Sep 17 00:00:00 2001 From: HARUO MATSUO Date: Thu, 17 Jun 2021 19:31:04 +0900 Subject: [PATCH 90/90] ubuntu 20.04 capable code --- kn/CMakeLists.txt | 3 ++- kn/src/knShare/LruPool.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kn/CMakeLists.txt b/kn/CMakeLists.txt index 65691ca..044a368 100644 --- a/kn/CMakeLists.txt +++ b/kn/CMakeLists.txt @@ -34,7 +34,8 @@ endif (NOT catkin_FOUND) # find dependencies find_package( ACE REQUIRED ) find_package( Eigen3 ) -find_package( Boost 1.46 REQUIRED program_options signals thread system chrono ) +# find_package( Boost 1.46 REQUIRED program_options signals thread system chrono ) +find_package( Boost 1.46 REQUIRED program_options thread system chrono ) find_package( GTest ) find_package( Doxygen ) diff --git a/kn/src/knShare/LruPool.h b/kn/src/knShare/LruPool.h index 0afa02a..e8d85a6 100644 --- a/kn/src/knShare/LruPool.h +++ b/kn/src/knShare/LruPool.h @@ -32,7 +32,7 @@ namespace kn { public: typedef T Type; - typedef shared_ptr TypePtr; + typedef boost::shared_ptr TypePtr; LruPool(size_t minPoolSize, int maxPoolSize = 0, bool reclaim = false) : m_minPoolSize(minPoolSize), @@ -110,4 +110,4 @@ namespace kn size_t m_maxUtilization; }; } -#endif // kn_LruPool_h \ No newline at end of file +#endif // kn_LruPool_h