├── .gitignore
├── CMakeLists.txt
├── README.md
├── cfg
└── visensor_node.cfg
├── include
└── visensor.hpp
├── launch
├── dense.launch
└── dense_UAV.launch
├── msg
├── visensor_calibration.msg
├── visensor_imu.msg
└── visensor_time_host.msg
├── package.xml
├── src
├── visensor.cpp
└── visensor_node.cpp
└── srv
└── visensor_calibration_service.srv
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Compiled Dynamic libraries
8 | *.so
9 | *.dylib
10 | *.dll
11 |
12 | # Compiled Static libraries
13 | *.lai
14 | *.la
15 | *.a
16 | *.lib
17 |
18 | # Executables
19 | *.exe
20 | *.out
21 | *.app
22 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 2.8.3)
2 | project(visensor_node)
3 |
4 | find_package(catkin REQUIRED COMPONENTS
5 | roscpp
6 | message_generation
7 | geometry_msgs
8 | sensor_msgs
9 | cv_bridge
10 | std_msgs
11 | image_transport
12 | camera_info_manager
13 | dynamic_reconfigure
14 | cmake_modules
15 | )
16 |
17 | # check libvisensor version, flags not used later
18 | find_package(libvisensor 1.1.0 REQUIRED)
19 |
20 | add_message_files(
21 | DIRECTORY msg
22 | FILES visensor_imu.msg
23 | visensor_time_host.msg
24 | visensor_calibration.msg
25 | )
26 |
27 | add_service_files(
28 | FILES
29 | visensor_calibration_service.srv
30 | )
31 |
32 | generate_messages(DEPENDENCIES geometry_msgs)
33 |
34 | include_directories(include ${catkin_INCLUDE_DIRS} ${libvisensor_INCLUDE_DIRS})
35 |
36 | find_package(Eigen REQUIRED)
37 | include_directories(${EIGEN_INCLUDE_DIR})
38 | add_definitions(${EIGEN_DEFINITIONS})
39 |
40 | find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc calib3d)
41 |
42 | generate_dynamic_reconfigure_options(cfg/visensor_node.cfg)
43 |
44 | if(NOT DEFINED CMAKE_BUILD_TYPE)
45 | set(CMAKE_BUILD_TYPE Release)
46 | endif(NOT DEFINED CMAKE_BUILD_TYPE)
47 |
48 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++0x -D__STRICT_ANSI__")
49 |
50 | catkin_package(
51 | INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
52 | CATKIN_DEPENDS
53 | roscpp
54 | sensor_msgs
55 | cv_bridge
56 | std_msgs
57 | image_transport
58 | camera_info_manager
59 | )
60 |
61 | #build and add libvisensor system library dependency
62 | add_executable(visensor_node src/visensor_node.cpp src/visensor.cpp )
63 |
64 | add_dependencies(visensor_node ${${PROJECT_NAME}_EXPORTED_TARGETS}})
65 | target_link_libraries(visensor_node ${libvisensor_LIBRARIES} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | visensor-node
2 | =============
3 |
4 | ROS interface to the Visual-Inertial Sensor developed by the [Autonomous Systems Lab (ASL), ETH Zurich](http://www.asl.ethz.ch) and [Skybotix AG](http://www.skybotix.com). This sensor provides fully time-synchronized and factory calibrated IMU- and stereo-camera datastreams. A detailed spec sheet of the sensor can be found [here](https://github.com/ethz-asl/libvisensor/blob/master/VISensor_Factsheet_web.pdf). The low-level driver for the VI-Sensor can be found [here](https://github.com/ethz-asl/libvisensor).
5 |
6 | 
7 |
8 | A detailed description on how the sensor can be used in ROS is found in the corresponding [ROS-Wiki](http://wiki.ros.org/vi_sensor).
9 |
10 | ##Authors
11 | * Michael Burri [michael.burri at mavt.ethz.ch]
12 | * Janosch Nikolic [janosch.nikolic at mavt.ethz.ch]
13 | * Jörn Rehder [joern.rehder at mavt.ethz.ch]
14 | * Stefan Leutenegger [s.leutenegger at imperial.ac.uk]
15 | * Thomas Schneider [schneith at ethz.ch]
16 | * Pascal Gohl [pascal.gohl at mavt.ethz.ch]
17 | * Sammy Omari [sammy.omari at mavt.ethz.ch]
18 |
19 | ## Reference
20 | Please cite our paper when using the VI-Sensor in an academic publication.
21 |
22 | 1. Nikolic, J., Rehder, J., Burri, M., Gohl, P., Leutenegger, S., Furgale, P. T., & Siegwart, R. (2014). *A Synchronized Visual-Inertial Sensor System with FPGA Pre-Processing for Accurate Real-Time SLAM.* IEEE International Conference on Robotics and Automation (ICRA), Hongkong, China. ( [video] (http://youtu.be/jcjB_Pflu5A) )
23 |
24 | as bibtex:
25 | ```
26 | @inproceedings{nikolic2014synchronized,
27 | title={A synchronized visual-inertial sensor system with FPGA pre-processing for accurate real-time SLAM},
28 | author={Nikolic, Janosch and Rehder, Joern and Burri, Michael and Gohl, Pascal and Leutenegger, Stefan and Furgale, Paul T and Siegwart, Roland},
29 | booktitle={Robotics and Automation (ICRA), 2014 IEEE International Conference on},
30 | pages={431--437},
31 | year={2014},
32 | organization={IEEE}
33 | }
34 | ```
35 |
36 | ## Installation
37 |
38 | Check out the sensor library and this node to your catkin workspace:
39 |
40 | ```
41 | cd your_catkin_workspace
42 | git clone https://github.com/ethz-asl/visensor_node.git
43 | git clone https://github.com/ethz-asl/libvisensor.git
44 | ```
45 |
46 | Make sure that you installed all necessary ROS packages
47 |
48 | ```
49 | sudo apt-get install libeigen3-dev libopencv-dev libboost-dev ros-indigo-cmake-modules
50 | ```
51 | Adjust the packet name to your ros version.
52 |
53 | Build the package using catkin_make
54 |
55 | ```
56 | catkin_make
57 | ```
58 |
--------------------------------------------------------------------------------
/cfg/visensor_node.cfg:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env python
2 |
3 | PACKAGE="visensor_node"
4 |
5 | from dynamic_reconfigure.parameter_generator_catkin import *
6 |
7 | gen = ParameterGenerator()
8 |
9 | # ========================= CAMERA 0 ==========================
10 | # Name Type Level Description Default Min Max
11 | gen.add("cam0_name", str_t, 0, "camera 0", "cam0")
12 | gen.add("cam0_agc_enable", bool_t, 0, "automatic gain control", True)
13 | gen.add("cam0_max_analog_gain", int_t, 0, "max analog gain", 64, 16, 64)
14 | gen.add("cam0_global_analog_gain", int_t, 0, "analog gain", 16, 16, 64)
15 | gen.add("cam0_global_analog_gain_attenuation", bool_t, 0, "gain attenuation", False)
16 |
17 | gen.add("digital_gain", int_t, 0, "digital gain", 4, 1, 15)
18 |
19 |
20 | gen.add("cam0_aec_enable", bool_t, 0, "automatic exposure control", True)
21 | gen.add("cam0_min_coarse_shutter_width", int_t, 0, "min shutter width", 2, 2, 32765)
22 | gen.add("cam0_max_coarse_shutter_width", int_t, 0, "max shutter width", 500, 2, 32765)
23 | gen.add("cam0_coarse_shutter_width", int_t, 0, "shutter", 480, 2, 32765)
24 | gen.add("cam0_fine_shutter_width", int_t, 0, "shutter", 0, 0, 1774)
25 |
26 | gen.add("cam0_adc_mode", int_t, 0, "ADC Mode", 2,2,3)
27 | gen.add("cam0_vref_adc_voltage_level", int_t, 0, "Vref ADC Voltage level", 4,0,7)
28 |
29 | gen.add("cam0_black_level_calibration_manual_override", bool_t, 0, "Black level calibration manual override", False)
30 | gen.add("cam0_black_level_calibration_value", int_t, 0, "Black level calibration value", 0,-127,127)
31 |
32 |
33 | # ========================= CAMERA 1 ==========================
34 |
35 | gen.add("cam1_name", str_t, 0, "camera 1", "cam1")
36 | gen.add("cam1_agc_enable", bool_t, 0, "automatic gain control", True)
37 | gen.add("cam1_max_analog_gain", int_t, 0, "max analog gain", 64, 16, 64)
38 | gen.add("cam1_global_analog_gain", int_t, 0, "analog gain", 16, 16, 64)
39 | gen.add("cam1_global_analog_gain_attenuation", bool_t, 0, "gain attenuation", False)
40 |
41 | gen.add("cam1_aec_enable", bool_t, 0, "automatic exposure control", True)
42 | gen.add("cam1_min_coarse_shutter_width", int_t, 0, "min shutter width", 2, 2, 32765)
43 | gen.add("cam1_max_coarse_shutter_width", int_t, 0, "max shutter width", 500, 2, 32765)
44 | gen.add("cam1_coarse_shutter_width", int_t, 0, "shutter", 480, 2, 32765)
45 |
46 | gen.add("cam1_adc_mode", int_t, 0, "ADC Mode", 2,2,3)
47 | gen.add("cam1_vref_adc_voltage_level", int_t, 0, "Vref ADC Voltage level", 4,0,7)
48 |
49 | # ========================= CAMERA 2 ==========================
50 |
51 | gen.add("cam2_name", str_t, 0, "camera 2", "cam2")
52 | gen.add("cam2_agc_enable", bool_t, 0, "automatic gain control", True)
53 | gen.add("cam2_max_analog_gain", int_t, 0, "max analog gain", 64, 16, 64)
54 | gen.add("cam2_global_analog_gain", int_t, 0, "analog gain", 16, 16, 64)
55 | gen.add("cam2_global_analog_gain_attenuation", bool_t, 0, "gain attenuation", False)
56 |
57 | gen.add("cam2_aec_enable", bool_t, 0, "automatic exposure control", True)
58 | gen.add("cam2_min_coarse_shutter_width", int_t, 0, "min shutter width", 2, 2, 32765)
59 | gen.add("cam2_max_coarse_shutter_width", int_t, 0, "max shutter width", 500, 2, 32765)
60 | gen.add("cam2_coarse_shutter_width", int_t, 0, "shutter", 480, 2, 32765)
61 |
62 | gen.add("cam2_adc_mode", int_t, 0, "ADC Mode", 2,2,3)
63 | gen.add("cam2_vref_adc_voltage_level", int_t, 0, "Vref ADC Voltage level", 4,0,7)
64 |
65 | # ========================= CAMERA 3 ==========================
66 |
67 | gen.add("cam3_name", str_t, 0, "camera 3", "cam3")
68 | gen.add("cam3_agc_enable", bool_t, 0, "automatic gain control", True)
69 | gen.add("cam3_max_analog_gain", int_t, 0, "max analog gain", 64, 16, 64)
70 | gen.add("cam3_global_analog_gain", int_t, 0, "analog gain", 16, 16, 64)
71 | gen.add("cam3_global_analog_gain_attenuation", bool_t, 0, "gain attenuation", False)
72 |
73 | gen.add("cam3_aec_enable", bool_t, 0, "automatic exposure control", True)
74 | gen.add("cam3_min_coarse_shutter_width", int_t, 0, "min shutter width", 2, 2, 32765)
75 | gen.add("cam3_max_coarse_shutter_width", int_t, 0, "max shutter width", 500, 2, 32765)
76 | gen.add("cam3_coarse_shutter_width", int_t, 0, "shutter", 100, 2, 32765)
77 |
78 | gen.add("cam3_adc_mode", int_t, 0, "ADC Mode", 2,2,3)
79 | gen.add("cam3_vref_adc_voltage_level", int_t, 0, "Vref ADC Voltage level", 4,0,7)
80 |
81 | exit(gen.generate(PACKAGE, "visensor_node", "Driver"))
82 |
83 |
--------------------------------------------------------------------------------
/include/visensor.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014, Skybotix AG, Switzerland (info@skybotix.com)
3 | * Copyright (c) 2014, Autonomous Systems Lab, ETH Zurich, Switzerland
4 | *
5 | * All rights reserved.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | #ifndef VISENSOR_H_
33 | #define VISENSOR_H_
34 |
35 | #include
36 | #include