浏览代码

in ros folder. add catkin folder.

yuchuli 3 年之前
父节点
当前提交
ebb48c49c7

+ 1 - 0
src/ros/catkin/.catkin_workspace

@@ -0,0 +1 @@
+# This file currently only serves to mark the location of a catkin workspace for tool integration

+ 1 - 0
src/ros/catkin/src/CMakeLists.txt

@@ -0,0 +1 @@
+/opt/ros/melodic/share/catkin/cmake/toplevel.cmake

+ 38 - 6
src/ros/testrosmodulecomm/CMakeLists.txt → src/ros/catkin/src/testrosmodulecomm/CMakeLists.txt

@@ -1,6 +1,44 @@
 cmake_minimum_required(VERSION 2.8.11)
 project(testrosmodulecomm)
 
+
+message(STATUS  "Enter testrosmodulecomm")
+
+
+SET(QT_PATH  /opt/qt/5.13.2/gcc_64)
+
+
+find_path(QT_EXIST   QtCore   ${QT_PATH}/include/QtCore)
+
+if(QT_EXIST)
+include_directories(
+  ${QT_PATH}/include
+  ${QT_PATH}/include/QtCore
+)
+link_directories(
+  ${QT_PATH}/lib
+)
+else()
+  message(FATAL_ERROR "Please set QT_PATH")
+endif()
+
+
+find_path(MODULECOMM_INCLUDE_DIR modulecomm.h  ${CMAKE_SOURCE_DIR}/../../../../include )
+find_library(MODULECOMM_LIBRARAY_DIR  modulecomm  ${CMAKE_SOURCE_DIR}/../../../../bin )
+
+if (MODULECOMM_INCLUDE_DIR  AND  MODULECOMM_LIBRARAY_DIR )
+  message(STATUS  "FIND  modulecomm")
+  include_directories(
+    ${CMAKE_SOURCE_DIR}/../../../../include
+  )
+  link_directories(
+    ${CMAKE_SOURCE_DIR}/../../../../bin
+)
+  else( )
+    message(FATAL_ERROR "Not Found modulecomm")
+endif ()
+
+
 ## Find catkin macros and libraries
 ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
 ## is used, also find other catkin packages
@@ -71,14 +109,8 @@ include_directories(
   ${CMAKE_CURRENT_BINARY_DIR}/..
   ${catkin_INCLUDE_DIRS} include
   ${Boost_INCLUDE_DIR}
-  /opt/qt/5.13.2/gcc_64/include
-  /opt/qt/5.13.2/gcc_64/include/QtCore
 )
 
-link_directories(
-  ${catkin_LIB_DIRS} lib
-  /opt/qt/5.13.2/gcc_64/lib
-)
 
 ## Declare a C++ executable
 add_executable(${PROJECT_NAME}_node src/main.cpp )

+ 0 - 0
src/ros/testrosmodulecomm/package.xml → src/ros/catkin/src/testrosmodulecomm/package.xml


+ 0 - 0
src/ros/testrosmodulecomm/src/main.cpp → src/ros/catkin/src/testrosmodulecomm/src/main.cpp


+ 0 - 80
src/ros/testrosmodulecomm/include/modulecomm.h

@@ -1,80 +0,0 @@
-#ifndef MODULECOMM_H
-#define MODULECOMM_H
-
-
-#include <QtCore/qglobal.h>
-#include <QDateTime>
-
-#include <functional>
-
-
-
-
-#if defined(MODULECOMM_LIBRARY)
-#  define MODULECOMMSHARED_EXPORT Q_DECL_EXPORT
-#else
-#  define MODULECOMMSHARED_EXPORT Q_DECL_IMPORT
-#endif
-
-
-
-
-
-
-//#include <iostream>
-//#include <thread>
-
-//using namespace std::placeholders;
-
-#ifndef IV_MODULE_FUN
-
-typedef std::function<void(const char * ,const unsigned int , const unsigned int , QDateTime * ,const char *)> ModuleFun;
-typedef void (* SMCallBack)(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
-#define IV_MODULE_FUN
-#endif
-
-namespace iv {
-namespace modulecomm {
-
-enum ModuleComm_TYPE
-{
-    ModuleComm_SHAREMEM = 0,
-    ModuleComm_INTERIOR = 1,
-    ModuleComm_FASTRTPS = 2,
-    ModuleComm_FASTRTPS_TCP = 3,
-    ModuleComm_UNDEFINE = 4
-};
-
-void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname);
-
-
-void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount
-                                            ,ModuleComm_TYPE xmctype,const unsigned short nport);
-void * MODULECOMMSHARED_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall,
-                                            ModuleComm_TYPE xmctype ,const char * strip,const unsigned short );
-void * MODULECOMMSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun,
-                                                ModuleComm_TYPE xmctype,const char * strip,const unsigned short );
-
-
-//void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount
-//                                            ,ModuleComm_TYPE xmctype = ModuleComm_UNDEFINE,const unsigned short nport = 5100);
-//void * MODULECOMMSHARED_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall,
-//                                            ModuleComm_TYPE xmctype = ModuleComm_UNDEFINE,const char * strip = 0,const unsigned short = 5100);
-//void * MODULECOMMSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun,
-//                                                ModuleComm_TYPE xmctype = ModuleComm_UNDEFINE,const char * strip = 0,const unsigned short = 5100);
-
-void MODULECOMMSHARED_EXPORT ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
-void MODULECOMMSHARED_EXPORT Unregister(void * pHandle);
-void MODULECOMMSHARED_EXPORT PauseComm(void * pHandle);
-void MODULECOMMSHARED_EXPORT ContintuComm(void * pHandle);
-
-void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount);
-void * MODULECOMMSHARED_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall);
-void * MODULECOMMSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun);
-
-
-}
-
-}
-
-#endif // MODULECOMM_H