Add ros wapper
This commit is contained in:
parent
1888145885
commit
746c99cbca
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -11,3 +11,11 @@ _output/
|
||||||
/*WARNING*
|
/*WARNING*
|
||||||
/*ERROR*
|
/*ERROR*
|
||||||
/*FATAL*
|
/*FATAL*
|
||||||
|
|
||||||
|
# ros
|
||||||
|
|
||||||
|
/wrappers/ros/build
|
||||||
|
/wrappers/ros/devel
|
||||||
|
/wrappers/ros/install
|
||||||
|
/wrappers/ros/.catkin_workspace
|
||||||
|
/wrappers/ros/src/CMakeLists.txt
|
||||||
|
|
35
Makefile
35
Makefile
|
@ -12,6 +12,7 @@ help:
|
||||||
@echo " make test build test and run"
|
@echo " make test build test and run"
|
||||||
@echo " make install install project"
|
@echo " make install install project"
|
||||||
@echo " make samples build samples"
|
@echo " make samples build samples"
|
||||||
|
@echo " make ros build ros wrapper"
|
||||||
@echo " make clean|cleanall clean generated or useless things"
|
@echo " make clean|cleanall clean generated or useless things"
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
@ -89,9 +90,27 @@ samples: install
|
||||||
|
|
||||||
.PHONY: samples
|
.PHONY: samples
|
||||||
|
|
||||||
|
# ros
|
||||||
|
|
||||||
|
ros: install
|
||||||
|
@$(call echo,Make $@)
|
||||||
|
@cd ./wrappers/ros && catkin_make
|
||||||
|
|
||||||
|
.PHONY: ros
|
||||||
|
|
||||||
|
cleanros:
|
||||||
|
@$(call echo,Make $@)
|
||||||
|
@$(call rm,./wrappers/ros/build/)
|
||||||
|
@$(call rm,./wrappers/ros/devel/)
|
||||||
|
@$(call rm,./wrappers/ros/install/)
|
||||||
|
@$(call rm,./wrappers/ros/.catkin_workspace)
|
||||||
|
@$(call rm,./wrappers/ros/src/CMakeLists.txt)
|
||||||
|
|
||||||
|
.PHONY: cleanros
|
||||||
|
|
||||||
# clean
|
# clean
|
||||||
|
|
||||||
clean:
|
clean: cleanros
|
||||||
@$(call echo,Make $@)
|
@$(call echo,Make $@)
|
||||||
@$(call rm,./_build/)
|
@$(call rm,./_build/)
|
||||||
@$(call rm,./_output/)
|
@$(call rm,./_output/)
|
||||||
|
@ -102,19 +121,19 @@ clean:
|
||||||
@$(call rm,./test/_output/)
|
@$(call rm,./test/_output/)
|
||||||
@$(MAKE) cleanlog
|
@$(MAKE) cleanlog
|
||||||
|
|
||||||
cleanall: clean
|
|
||||||
@$(call rm,./doc/_output/)
|
|
||||||
@$(call rm,./test/gtest/_build/)
|
|
||||||
@$(call rm,./third_party/glog/_build/)
|
|
||||||
@$(FIND) . -type f -name ".DS_Store" -print0 | xargs -0 rm -f
|
|
||||||
|
|
||||||
cleanlog:
|
cleanlog:
|
||||||
@$(call rm_f,*INFO*)
|
@$(call rm_f,*INFO*)
|
||||||
@$(call rm_f,*WARNING*)
|
@$(call rm_f,*WARNING*)
|
||||||
@$(call rm_f,*ERROR*)
|
@$(call rm_f,*ERROR*)
|
||||||
@$(call rm_f,*FATAL*)
|
@$(call rm_f,*FATAL*)
|
||||||
|
|
||||||
.PHONY: clean cleanall cleanlog
|
cleanall: clean cleanlog
|
||||||
|
@$(call rm,./doc/_output/)
|
||||||
|
@$(call rm,./test/gtest/_build/)
|
||||||
|
@$(call rm,./third_party/glog/_build/)
|
||||||
|
@$(FIND) . -type f -name ".DS_Store" -print0 | xargs -0 rm -f
|
||||||
|
|
||||||
|
.PHONY: clean cleanlog cleanall
|
||||||
|
|
||||||
# others
|
# others
|
||||||
|
|
||||||
|
|
|
@ -1 +1,15 @@
|
||||||
# Wrappers for MYNT® EYE SDK
|
# Wrappers for MYNT® EYE SDK
|
||||||
|
|
||||||
|
## MYNT EYE ROS Wrapper
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd <sdk>
|
||||||
|
make ros
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
```
|
||||||
|
|
57
wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt
Normal file
57
wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.3)
|
||||||
|
project(mynt_eye_ros_wrapper)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(checkPackage package customMessage)
|
||||||
|
set(varName "${package}_FOUND")
|
||||||
|
if (NOT "${${varName}}")
|
||||||
|
string(REPLACE "_" "-" aptPackage ${package})
|
||||||
|
if("${customMessage}" STREQUAL "")
|
||||||
|
message(FATAL_ERROR "\n\n ${package} is missing, please try to install it with:\n sudo apt-get install ros-$(rosversion -d)-${aptPackage}\n\n")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "\n\n ${customMessage} \n\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endfunction(checkPackage)
|
||||||
|
|
||||||
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
|
cv_bridge
|
||||||
|
image_transport
|
||||||
|
nodelet
|
||||||
|
roscpp
|
||||||
|
sensor_msgs
|
||||||
|
std_msgs
|
||||||
|
)
|
||||||
|
|
||||||
|
checkPackage("cv_bridge" "")
|
||||||
|
checkPackage("image_transport" "")
|
||||||
|
checkPackage("nodelet" "")
|
||||||
|
checkPackage("roscpp" "")
|
||||||
|
checkPackage("sensor_msgs" "")
|
||||||
|
checkPackage("std_msgs" "")
|
||||||
|
|
||||||
|
catkin_package(
|
||||||
|
CATKIN_DEPENDS cv_bridge image_transport nodelet roscpp sensor_msgs std_msgs
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build
|
||||||
|
|
||||||
|
add_compile_options(-std=c++11)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
# include
|
||||||
|
${catkin_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Install
|
||||||
|
|
||||||
|
install(DIRECTORY launch
|
||||||
|
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY rviz
|
||||||
|
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||||
|
)
|
41
wrappers/ros/src/mynt_eye_ros_wrapper/package.xml
Normal file
41
wrappers/ros/src/mynt_eye_ros_wrapper/package.xml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<package format="2">
|
||||||
|
<name>mynt_eye_ros_wrapper</name>
|
||||||
|
<version>0.0.0</version>
|
||||||
|
<description>The mynt eye ros wrapper package</description>
|
||||||
|
|
||||||
|
<maintainer email="johnzhao@slightech.com">John Zhao</maintainer>
|
||||||
|
|
||||||
|
<license>Slightech License</license>
|
||||||
|
|
||||||
|
<!-- <url type="website">http://wiki.ros.org/mynt_eye_ros_wrapper</url> -->
|
||||||
|
|
||||||
|
<author email="johnzhao@slightech.com">John Zhao</author>
|
||||||
|
|
||||||
|
<buildtool_depend>catkin</buildtool_depend>
|
||||||
|
<build_depend>cv_bridge</build_depend>
|
||||||
|
<build_depend>image_transport</build_depend>
|
||||||
|
<build_depend>nodelet</build_depend>
|
||||||
|
<build_depend>roscpp</build_depend>
|
||||||
|
<build_depend>sensor_msgs</build_depend>
|
||||||
|
<build_depend>std_msgs</build_depend>
|
||||||
|
|
||||||
|
<build_export_depend>cv_bridge</build_export_depend>
|
||||||
|
<build_export_depend>image_transport</build_export_depend>
|
||||||
|
<build_export_depend>nodelet</build_export_depend>
|
||||||
|
<build_export_depend>roscpp</build_export_depend>
|
||||||
|
<build_export_depend>sensor_msgs</build_export_depend>
|
||||||
|
<build_export_depend>std_msgs</build_export_depend>
|
||||||
|
|
||||||
|
<exec_depend>cv_bridge</exec_depend>
|
||||||
|
<exec_depend>image_transport</exec_depend>
|
||||||
|
<exec_depend>nodelet</exec_depend>
|
||||||
|
<exec_depend>roscpp</exec_depend>
|
||||||
|
<exec_depend>sensor_msgs</exec_depend>
|
||||||
|
<exec_depend>std_msgs</exec_depend>
|
||||||
|
|
||||||
|
<!-- The export tag contains other, unspecified, tags -->
|
||||||
|
<export>
|
||||||
|
<!-- Other tools can request additional information be placed here -->
|
||||||
|
</export>
|
||||||
|
</package>
|
Loading…
Reference in New Issue
Block a user