• Diff for "vi_sensor"
Differences between revisions 41 and 42
Revision 41 as of 2014-05-02 18:25:03
Size: 7872
Editor: SammyOmari
Comment:
Revision 42 as of 2014-05-05 09:20:24
Size: 8181
Editor: SammyOmari
Comment:
Deletions are marked like this. Additions are marked like this.
Line 128: Line 128:
=== Can I run the sensor in Windows? ===

The driver currently only supports Ubuntu 12.04 or higher. If you want to use the sensor in Windows, the users are encouraged to use a Virtual Machine. However, it is noted that the host driver is open source and should be fairly easy to be ported to Windows.

Overview

This stack describes the ROS interface to the Visual-Inertial (VI-) Sensor developed by Skybotix and the Autonomous Systems Lab (ASL), ETH Zurich. 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.

VI-Sensor

Powering the Sensor

You can use the provided USB 3.0 micro cable to power your sensor. Your USB controller on your computer should be able to provide at least 500 mA. When your USB port provides less than 500 mA, the sensor might still start up, but the image stream will be flickering in this case.

Otherwise, you can connect your sensor to a 12 V power supply using the pre-crimped cable. Please refer to the figure below for polarity information. The input voltage can vary from 10-15V, so connecting the sensor directly to a battery is feasible.

Power Connectors for VI-Sensor

Connecting the Sensor

Using the Ethernet cable that came with your sensor, you can connect your VI-sensor to a computer or to a network switch. Please note, that the network and the computer should support Gigabit Ethernet as a 100 MBit LAN does not provide sufficient bandwidth for the sensor data. If you dont have a Gigabit ethernet port but a USB 3.0 port (for example in the Odroid-XU board), a USB3.0 to GigE adapter should work fine. As the Ethernet port on the sensor does not follow Ethernet standards, use only the provided cable to connect your sensor to either your PC or a network hub/switch.

When the sensor is powered-up (boot up can take up to 20-30s) and connected directly to your computer, the sensor will act as a dhcp server and you will obtain an IP (most likely 10.0.0.5). In case the sensor is connected to a network with an existing dhcp server, the sensor should automatically disable its dhcp server and obtain an IP from the network.

If you want to run the sensor driver in a virtual machine (this is possible), please refer to the FAQ .

Interfacing the Sensor From ROS

You can either create a standalone executable for accessing the vi-sensor or you can stream the vi-sensor output to ROS (Robotic Operating System, www.ros.org ) using the corresponding ROS-frontend. For the standalone interface, refer to this section.

You can download the ROS frontend and the low-level driver from github into your rosbuild workspace (for information on how to set up your rosbuild workspace, please refer to this tutorial).:

 #making sure you have all the necessary dependencies
 sudo apt-get install cmake libboost-dev libboost-thread-dev libboost-system-dev libboost-chrono-dev libboost-regex-dev libcurl3-dev libssh2-1-dev libopencv-highgui-dev libopencv-core-dev
 #change directory into rosbuild folder
 roscd
 #checkout low-level driver
 git clone https://github.com/ethz-asl/libvisensor.git
 #checkout ROS frontend
 git clone https://github.com/ethz-asl/visensor-node
 # make visensor
 rosmake visensor_node

Assuming that the sensor is powered and connected, you can run the driver as

rosrun visensor_node visensor_node

If there is an error (most likely failed autodiscovery), please refer to the FAQ.

If the ROS frontend started properly, you can check the image stream using

rosrun image_view image_view image:=/cam0/image_raw
rosrun image_view image_view image:=/cam1/image_raw

The IMU stream is at the topic /imu0

rostopic echo /imu0

If you have downloaded and properly installed the vi-sensor calibration files (see this section), you can launch the ROS block-matcher stereo pipeline using

roslaunch visensor_node ros_stereo.launch

If the disparity output is very noisy, please refer to the FAQ.

The VI-sensor comes preconfigured with standard settings, such as automatic gain and exposure control for example. If you want to change these parameters, you can do this using rqt_configure. This tool allows the fine-grained control of the imaging sensors (e.g. gain-, exposure settings etc.) and the IMU.

Running the VI Sensor Standalone (Without ROS)

You can create your own applications without ROS by linking it to the low-level sensor driver library. You can download the library as

 #checkout low-level driver
 git clone https://github.com/ethz-asl/libvisensor.git

You can build and install the library using the buildscripts

 #change scripts directory
 cd libvisensor/build_scripts
 ./build_and_install

If you don't want to install the library system-wide, you find the correpsonding script in the same folder. In this case, don't forget to set the proper include- and library search directory for your application. We provide a stand-alone sample application that you can use as a starting-point for the development of your algorithms. You can download and build it as

 # checkout sample applications
 git clone https://github.com/skybotix/visensor_sample_applications
 # build one
 cd visensor_interface
 mkdir build
 cmake ..
 make -j8

If the sensor is connected, you can start the application

 ../bin/visensor_interface

and you should now see both image streams displayed. There is also a sample application that allows the fine-grained control of the imaging sensors (e.g. gain-, exposure settings etc.) as well as another one which performs image rectification and dense block-matching. They are also part of the visensor_sample_applications stack.

Sensor Calibration Data

The VI-Sensor is calibrated for camera intrinics as well as IMU-camera or camera-camera extrinsic respectively. The calibration follows the standard openCV camera calibration (pinhole camera model + radial tangential lense model). You can download the calibration parameters from our webserver as

wget http://www.skybotix.com/vi-calibration/p<serial number>.zip

You can find the serial number on the GigE port of your sensor (e.g. the filename could be p21005.zip). The files are documented and should be self-explanatory. For the ROS-frontend to stream the calibration data in the corresponding camera_info message, you should copy the contents of the zip file to the calibration folder of the aslam_sensor_driver folder in your rosbuild workspace

#change to calibration directory of driver
roscd visensor_node/calibration/
wget http://www.skybotix.com/vi-calibration/p<serial number>.zip
unzip p<serial number>.zip

If the VI-sensor ROS-node is already running, please restart it, to include the new calibration files.

Accessing The Sensor Inside a Virtual Machine

You should be able to access the sensor inside a virtual machine. As a default configuration, VMs usually use a NAT network configuration, which blocks the sensor datastream. Instead, we have to set the network configuration of your Gigabit Ethernet adapter to "bridged". Using this setting, the VM will have direct access to the adapter and subsequently to the sensor.

FAQ

Can I run the sensor in Windows?

The driver currently only supports Ubuntu 12.04 or higher. If you want to use the sensor in Windows, the users are encouraged to use a Virtual Machine. However, it is noted that the host driver is open source and should be fairly easy to be ported to Windows.

Why Is My Sensor Not Detected

Here comes the help!

Wiki: vi_sensor (last edited 2017-10-16 08:15:01 by LankhorstTom)