Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Di Zeng committed Jul 10, 2016
1 parent 935fdc2 commit 4779e01
Show file tree
Hide file tree
Showing 7 changed files with 546 additions and 1 deletion.
51 changes: 51 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
cmake_minimum_required(VERSION 2.8.3)
project(zed_cpu_ros)

find_package(catkin REQUIRED
COMPONENTS
cmake_modules
roscpp
tf
cv_bridge
image_transport
)
# set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")

# find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
find_package(OpenCV REQUIRED)

include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

add_definitions(${EIGEN_DEFINITIONS})

link_directories(${catkin_LIBRARY_DIRS})

catkin_package(
# INCLUDE_DIRS include
LIBRARIES
CATKIN_DEPENDS
)

# add_library(zed_cpu_ros src/zed_cpu_ros.cpp)
# target_link_libraries(zed_cpu_ros ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Boost_LIBRARIES})
# add_dependencies(zed_cpu_ros arti_msgs_gencpp)

add_executable(zed_cpu_ros src/zed_cpu_ros.cpp)
target_link_libraries(zed_cpu_ros ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBS})

# install(TARGETS
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# PATTERN ".svn" EXCLUDE
# )
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# zed_cpu_ros
zed_cpu_ros
===========
A simple zed camera driver which only use CPU and only publish left and right raw images and its camera info.

# Useage:
1. git the packge into your working space
2. find your zed calibration files in
```
cd /usr/local/zed/settings
```
or download from:
http://calib.stereolabs.com/?SN=XXXX
Node: XXXX is your last four digit S/N of your camera, change it !!
3. update launch file configuration file name in zed_cpu_ros.launch into your SNXXXX.conf
```
roscd zed_cpu_ros/launch
```
4. launch the code
```
roslaucnh zed_cpu_ros zed_cpu_ros.launch
```
# TODO:
1. add the launch file for stereo_proc.
2. add the nodelet function.
# Transcend Robotics:
Patented articulated traction control ARTI technology for stair climbing and obstacle traversal without complex software or controls
http://transcendrobotics.com/
# Authour:
Di Zeng
78 changes: 78 additions & 0 deletions config/SN1267.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[LEFT_CAM_2K]
cx=1164.13
cy=574.379
fx=1400.09
fy=1400.09
k1=-0.171543
k2=0.0240596

[LEFT_CAM_FHD]
cx=1020.13
cy=493.379
fx=1400.09
fy=1400.09
k1=-0.171543
k2=0.0240596

[LEFT_CAM_HD]
cx=668.567
cy=335.19
fx=700.045
fy=700.045
k1=-0.171543
k2=0.0240596

[LEFT_CAM_VGA]
cx=349.784
cy=175.095
fx=350.023
fy=350.023
k1=-0.171543
k2=0.0240596

[RIGHT_CAM_2K]
cx=1061.5
cy=630.943
fx=1400.05
fy=1400.05
k1=-0.171688
k2=0.0240001

[RIGHT_CAM_FHD]
cx=917.499
cy=549.943
fx=1400.05
fy=1400.05
k1=-0.171688
k2=0.0240001

[RIGHT_CAM_HD]
cx=617.249
cy=363.471
fx=700.025
fy=700.025
k1=-0.171688
k2=0.0240001

[RIGHT_CAM_VGA]
cx=324.125
cy=189.236
fx=350.013
fy=350.013
k1=-0.171688
k2=0.0240001

[STEREO]
BaseLine=120
CV_2K=0.0223798
CV_FHD=0.0223798
CV_HD=0.0223798
CV_VGA=0.0223798
RX_2K=0.00388714
RX_FHD=0.00388714
RX_HD=0.00388714
RX_VGA=0.00388714
RZ_2K=-0.00139603
RZ_FHD=-0.00139603
RZ_HD=-0.00139603
RZ_VGA=-0.00139603
12 changes: 12 additions & 0 deletions launch/image_proc.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Current image_pipeline and cv_bridge is not stable with opencv 3.0, image_proc not working for me
and tried of rolling back to opencv2.4, so test if it works for opencv 2.4 -->
<launch>
<include file="$(find zed_cpu_ros)/launch/zed_cpu_ros.launch" ns="camera"/>
<node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc" respawn="true" output="screen" ns="camera"/>
<!-- <remap from="left/image_raw" to="/left/image_raw"/>
<remap from="left/camera_info" to="/left/camera_info"/>
<remap from="right/image_raw" to="/right/image_raw"/>
<remap from="right/camera_info" to="/right/camera_info"/> -->
<!-- </node> -->

</launch>
13 changes: 13 additions & 0 deletions launch/zed_cpu_ros.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<launch>
<arg name="config_file_location" default="$(find zed_cpu_ros)/config/SN1267.conf"/>
<arg name="camera_namespace" default="camera"/>

<node pkg="zed_cpu_ros" type="zed_cpu_ros" name="zed_cpu_ros_node" output="screen" ns="$(arg camera_namespace)">
<param name="resolution" value="1"/>
<param name="frame_rate" value="30"/>
<param name="config_file_location" value="$(arg config_file_location)"/>
<param name="show_image" value="false"/>
<param name="left_frame_id" value="left_camera"/>
<param name="right_frame_id" value="right_camera"/>
</node>
</launch>
31 changes: 31 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<package>
<name>zed_cpu_ros</name>
<version>0.0.1</version>
<description>
A simple zed camera driver which only use CPU and only publish left and right raw images.
</description>
<author>Di Zeng</author>
<author>di.zeng@transcendrobotics.com</author>
<maintainer email="di.zeng@transcendrobotics.com">Di Zeng</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>cmake_modules</build_depend>
<!-- <build_depend>eigen3</build_depend> -->
<build_depend>roscpp</build_depend>
<build_depend>tf</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>image_transport</build_depend>

<run_depend>cmake_modules</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>tf</run_depend>
<run_depend>cv_bridge</run_depend>

<export>
</export>

</package>


Loading

0 comments on commit 4779e01

Please sign in to comment.