updated ros wrapper to work with can sdk

This commit is contained in:
Ruixiang Du
2019-06-14 11:10:51 -04:00
parent 7807b33529
commit 48037d0d88
4417 changed files with 628441 additions and 8525 deletions

View File

@@ -2,76 +2,31 @@ cmake_minimum_required(VERSION 2.8.3)
project(scout_base)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
rospy
std_msgs
tf
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
Encode.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
geometry_msgs # std_msgs
)
################################################
## Declare ROS dynamic reconfigure parameters ##
################################################
## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )
find_package(catkin REQUIRED COMPONENTS
controller_manager
hardware_interface
husky_msgs
diagnostic_updater
roslaunch
roslint
roscpp
sensor_msgs
std_msgs
geometry_msgs
tf)
find_package(Boost REQUIRED COMPONENTS chrono)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
# LIBRARIES scout_base
CATKIN_DEPENDS message_runtime geometry_msgs roscpp rospy std_msgs tf
# DEPENDS system_lib
INCLUDE_DIRS include
# LIBRARIES scout_base
CATKIN_DEPENDS diagnostic_updater hardware_interface scout_msgs roscpp sensor_msgs
# DEPENDS Boost
)
###########
@@ -88,56 +43,25 @@ include_directories(
# add scout sdk
add_subdirectory(src/scout_sdk)
add_executable(scout_ros src/scout_ros.cpp)
target_link_libraries(scout_ros scoutcpp ${catkin_LIBRARIES})
add_executable(scout_base_node src/scout_base_node.cpp src/scout_messenger.cpp)
target_link_libraries(scout_base_node scout_base ${catkin_LIBRARIES})
add_executable(keybord src/keybord.cpp)
target_link_libraries(keybord ${catkin_LIBRARIES})
# add_executable(keybord src/keybord.cpp)
# target_link_libraries(keybord ${catkin_LIBRARIES})
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
# roslaunch_add_file_check(launch)
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# install(TARGETS scoutcpp scoutio scout_base
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_scout_base.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
# install(DIRECTORY launch config
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})