Changeset 99 in pacpussensors for trunk/VelodyneComponent
- Timestamp:
- Oct 15, 2015, 2:47:01 PM (9 years ago)
- Location:
- trunk/VelodyneComponent
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VelodyneComponent/CMakeLists.txt
r66 r99 1 #########################quick start############################################ 2 #cmake ../ -G "CodeBlocks - Unix Makefiles" 3 #make 4 #make install 5 #make clean 6 ################################################################################ 1 7 project(Velodyne) 8 set(${PROJECT_NAME}_VERSION_MAJOR 0) 9 set(${PROJECT_NAME}_VERSION_MINOR 1) 10 add_definitions( -DVELODYNEHDL64S2_EXPORTS ) 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME}) 13 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 14 add_definitions (${QT_DEFINITIONS}) 2 15 16 find_package(Qt5Network REQUIRED) 3 17 ################################################################################ 4 add_definitions( -DVELODYNEHDL64S2_EXPORTS ) 5 6 7 8 # ======================================== 9 # Configure qt4 10 # ======================================== 11 if(QT4_FOUND) 12 set(QT_USE_QTXML true) 13 set(QT_USE_QTNETWORK true) 14 include(${QT_USE_FILE}) 15 else() 16 message(ERROR "Qt4 needed") 17 endif() 18 19 # ======================================== 20 # Compiler definitions 21 # ======================================== 22 add_definitions( 23 ${QT_DEFINITIONS} 24 ) 25 26 # ======================================== 27 # Include directories 28 # ======================================== 29 include_directories( 30 ${PROJECT_BINARY_DIR} 31 ${QT_INCLUDE_DIR} 18 # DIRECTORIES 19 include_directories( 20 ${PROJECT_BINARY_DIR} 21 ${QT_INCLUDE_DIR} 22 ${PACPUS_INCLUDE_DIR} 23 ${PACPUS_INCLUDE_DIR}/Pacpus/ 32 24 ) 33 25 … … 35 27 # Link directories 36 28 # ======================================== 37 link_directories( ${PACPUS_LIB_DIR} 29 link_directories( 30 ${PACPUS_LIB_DIR} 38 31 ) 39 32 40 33 41 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 42 43 # ======================================== 44 # List of sources 45 # ======================================== 46 set( 47 PROJECT_SRCS 48 VelodyneComponent.cpp 49 VelodyneComponent.h 34 ################################################################################ 35 # FILES 36 set(PROJECT_HDRS 37 ${EXPORT_HDR} 38 VelodyneComponent.h 39 structure_velodyne.h 40 ${PROJECT_NAME}.xml 41 ${PROJECT_NAME}_d.xml 42 ) 43 set(PROJECT_SRCS 50 44 ${PLUGIN_CPP} 45 VelodyneComponent.cpp 51 46 ) 52 47 53 # ======================================== 54 # Files to MOC 55 # ======================================== 56 set( 57 FILES_TO_MOC 58 VelodyneComponent.h 59 ${PLUGIN_H} 48 set(FILES_TO_MOC 49 ${PLUGIN_HDR} 50 VelodyneComponent.h 60 51 ) 61 52 62 set( 63 UI_FILES 64 53 set(UI_FILES 65 54 ) 66 55 67 # ======================================== 68 # Call MOC 69 # ======================================== 70 qt4_wrap_cpp( 71 PROJECT_MOC_SRCS 56 ################################################################################ 57 # Qt: call moc, uic 58 qt_wrap_cpp(PROJECT_MOC_SRCS 72 59 ${FILES_TO_MOC} 73 60 ) 74 61 75 qt4_wrap_ui( 76 PROJECT_UI_SRCS 62 qt_wrap_ui(PROJECT_UI_SRCS 77 63 ${UI_FILES} 78 64 ) 79 65 80 # ======================================== 81 # Build a library 82 # ======================================== 83 pacpus_add_library( 84 ${PROJECT_NAME} SHARED 66 ################################################################################ 67 # BUILD and LINK 68 pacpus_add_library(${PROJECT_NAME} SHARED 69 ${PROJECT_HDRS} 85 70 ${PROJECT_SRCS} 86 71 ${PROJECT_MOC_SRCS} … … 88 73 ) 89 74 90 message(STATUS ${PACPUS_DEPENDENCIES_LIB} )91 75 76 # ======================================== 77 # Libraries 78 # ======================================== 92 79 set(LIBS 93 80 optimized FileLib debug FileLib_d … … 100 87 ) 101 88 endif() 102 103 # ======================================== 104 # Libraries 105 # ======================================== 106 # All the platform 107 target_link_libraries( 108 ${PROJECT_NAME} 109 ${PACPUS_LIBRARIES} 110 ${QT_LIBRARIES} 111 ${PACPUS_DEPENDENCIES_LIB} 112 ${LIBS} 113 ) 114 89 # LINK 90 target_link_libraries(${PROJECT_NAME} 91 ${PACPUS_LIBRARIES} 92 ${PACPUS_DEPENDENCIES_LIB} 93 ${LIBS} 94 ${QT_LIBRARIES} 95 ) 96 qt5_use_modules(${PROJECT_NAME} Network) 97 ################################################################################ 98 # FOLDERS 115 99 pacpus_folder(${PROJECT_NAME} "components") 116 117 # ======================================== 118 # Install 119 # ======================================== 120 pacpus_install(${PROJECT_NAME}) 100 ################################################################################ 101 # INSTALL 102 pacpus_install(${PROJECT_NAME}) -
trunk/VelodyneComponent/VelodyneComponent.cpp
r66 r99 5 5 // author: Gerald Dherbomez 6 6 // Copyright Heudiasyc UMR UTC/CNRS 6599 7 // 7 // 8 8 // version: $Id: $ 9 9 // … … 20 20 21 21 #include <QtEndian> 22 #include <Q UdpSocket>22 #include <QtNetwork/QUdpSocket> 23 23 #include <string> 24 24 … … 49 49 { 50 50 LOG_TRACE("constructor(" << name << ")"); 51 52 ComponentManager * mgr = ComponentManager::getInstance();53 LOG_DEBUG("manager = " << mgr);51 52 //ComponentManager * mgr = ComponentManager::getInstance(); 53 //LOG_DEBUG("manager = " << mgr); 54 54 55 55 setRecording (true); … … 86 86 /// TODO: doc 87 87 void VelodyneComponent::run() 88 { 88 { 89 89 initialize(); 90 90 exec(); // launch the exec loop, blocking until receiving exit() signal ... … … 197 197 ////////////////////////////////////////////////////////////////////////// 198 198 /// new data coming from Velodyne sensor 199 void VelodyneComponent::readPendingDatagrams() 199 void VelodyneComponent::readPendingDatagrams() 200 200 { 201 201 // get a timestamp … … 338 338 //*/ 339 339 } 340 340 341 341 mVelodyneData->range = mBlockIndex+(lastBlockIndex - 1); 342 342 LOG_DEBUG("range = " << mVelodyneData->range); -
trunk/VelodyneComponent/VelodyneComponent.h
r66 r99 7 7 #define VELODYNECOMPONENT_H 8 8 9 #include < qhostaddress.h>9 #include <QtNetwork/qhostaddress.h> 10 10 #include <qthread.h> 11 11
Note:
See TracChangeset
for help on using the changeset viewer.