Commit 28f09819 authored by Sydney Speckle's avatar Sydney Speckle

converting emros_common and utility_ofc into catkin package; fixing CMakeLists dependencies

parent 803c0b21
...@@ -14,6 +14,8 @@ find_package(catkin REQUIRED COMPONENTS ...@@ -14,6 +14,8 @@ find_package(catkin REQUIRED COMPONENTS
geometry_msgs geometry_msgs
tf tf
message_generation message_generation
utility_ofc
emros_common
) )
## System dependencies are found with CMake's conventions ## System dependencies are found with CMake's conventions
...@@ -109,11 +111,11 @@ find_package(catkin REQUIRED COMPONENTS ...@@ -109,11 +111,11 @@ find_package(catkin REQUIRED COMPONENTS
## CATKIN_DEPENDS: catkin_packages dependent projects also need ## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need ## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package( catkin_package(
INCLUDE_DIRS include #INCLUDE_DIRS include
# LIBRARIES basecontroller # LIBRARIES basecontroller
# CATKIN_DEPENDS other_catkin_pkg # CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib # DEPENDS system_lib
CATKIN_DEPENDS message_runtime #CATKIN_DEPENDS message_runtime
) )
########### ###########
...@@ -124,12 +126,50 @@ CATKIN_DEPENDS message_runtime ...@@ -124,12 +126,50 @@ CATKIN_DEPENDS message_runtime
## Your package locations should be listed before other locations ## Your package locations should be listed before other locations
include_directories( include_directories(
include include
../emros_common/inc
../utility_ofc/inc
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
) )
## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME}_node src/basecontroller_node.cpp src/basecontroller.cpp src/kinematics.cpp)
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
## Add cmake target dependencies of the executable
## same as for the library above
add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
)
#add_executable(basecontroller src/basecontroller_node.cpp src/basecontroller.cpp src/kinematics.cpp)
#add_dependencies(basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(basecontroller ${catkin_LIBRARIES} )
#add_executable(mecanum_basecontroller src/mecanum_basecontroller.cpp ) #add_executable(mecanum_basecontroller src/mecanum_basecontroller.cpp )
#add_dependencies(mecanum_basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ) #add_dependencies(mecanum_basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(mecanum_basecontroller ${catkin_LIBRARIES} ) #target_link_libraries(mecanum_basecontroller ${catkin_LIBRARIES} )
...@@ -142,9 +182,7 @@ CATKIN_DEPENDS message_runtime ...@@ -142,9 +182,7 @@ CATKIN_DEPENDS message_runtime
#add_dependencies(diff_basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ) #add_dependencies(diff_basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
#target_link_libraries(diff_basecontroller ${catkin_LIBRARIES} ) #target_link_libraries(diff_basecontroller ${catkin_LIBRARIES} )
add_executable(basecontroller src/basecontroller_node.cpp src/basecontroller.cpp src/kinematics.cpp)
add_dependencies(basecontroller ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(basecontroller ${catkin_LIBRARIES} )
## Declare a C++ library ## Declare a C++ library
# add_library(sepp_basecontroller # add_library(sepp_basecontroller
...@@ -164,7 +202,7 @@ target_link_libraries(basecontroller ${catkin_LIBRARIES} ) ...@@ -164,7 +202,7 @@ target_link_libraries(basecontroller ${catkin_LIBRARIES} )
# add_dependencies(sepp_basecontroller_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) # add_dependencies(sepp_basecontroller_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against ## Specify libraries to link a library or executable target against
# target_link_libraries(sepp_basecontroller_node # target_link_libraries(basecontroller
# ${catkin_LIBRARIES} # ${catkin_LIBRARIES}
# ) # )
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
<run_depend>roscpp</run_depend> <run_depend>roscpp</run_depend>
<build_depend>emros_dispatcher</build_depend> <build_depend>emros_dispatcher</build_depend>
<build_depend>geometry_msgs</build_depend> <build_depend>geometry_msgs</build_depend>
<build_depend>utility_ofc</build_depend>
<build_depend>emros_common</build_depend>
<run_depend>emros_dispatcher</run_depend> <run_depend>emros_dispatcher</run_depend>
<run_depend>geometry_msgs</run_depend> <run_depend>geometry_msgs</run_depend>
<build_depend>message_generation</build_depend> <build_depend>message_generation</build_depend>
...@@ -54,4 +56,4 @@ ...@@ -54,4 +56,4 @@
<export> <export>
<cpp cflags="-I${prefix}/include `rosboost-cfg --cflags`" lflags=""/> <cpp cflags="-I${prefix}/include `rosboost-cfg --cflags`" lflags=""/>
</export> </export>
</package> </package>
\ No newline at end of file
emros_common @ cc5ddbf7
Subproject commit 309c068ff4c0fefd794489caf57cbb7664f9ae9a Subproject commit cc5ddbf7c37d4942100633ad99f06171b6b7dff7
...@@ -10,6 +10,8 @@ add_definitions(-std=c++11) ...@@ -10,6 +10,8 @@ add_definitions(-std=c++11)
find_package(catkin REQUIRED COMPONENTS find_package(catkin REQUIRED COMPONENTS
roscpp roscpp
message_generation message_generation
utility_ofc
emros_common
) )
## System dependencies are found with CMake's conventions ## System dependencies are found with CMake's conventions
...@@ -118,14 +120,38 @@ CATKIN_DEPENDS message_runtime std_msgs ...@@ -118,14 +120,38 @@ CATKIN_DEPENDS message_runtime std_msgs
## Your package locations should be listed before other locations ## Your package locations should be listed before other locations
include_directories( include_directories(
include include
../utility_ofc/inc
../emros_common/inc
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
) )
add_executable(dispatcher src/dispatcher.cpp src/udpsocket.cpp ../utility_ofc/src/ethprotocol.cpp ../utility_ofc/src/crc16.cpp)
add_dependencies(dispatcher ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) ## Add cmake target dependencies of the library
target_link_libraries(dispatcher ${catkin_LIBRARIES} ) ## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME}_node src/dispatcher.cpp src/udpsocket.cpp)
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
## Add cmake target dependencies of the executable
## same as for the library above
add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
)
#add_executable(dispatcher src/dispatcher.cpp src/udpsocket.cpp ../utility_ofc/src/ethprotocol.cpp ../utility_ofc/src/crc16.cpp)
#add_dependencies(dispatcher ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
#target_link_libraries(dispatcher ${catkin_LIBRARIES} )
## Declare a C++ library ## Declare a C++ library
# add_library(sepp_dispatcher # add_library(sepp_dispatcher
......
utility_ofc @ 7106fe9c
Subproject commit 91603b92843550a2751c83947ee5cf35c3a8f442 Subproject commit 7106fe9cac78b72891b5610afe95fdcf253877e8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment