uvc_ros_driver
is a ROS package that publishes video streams from USB video devices. It is made for devices that send multiple grayscale images as well as IMU data encoded in a color image stream.
You will need ROS indigo and the ait_ros_messages
ROS package.
You need libusb
installed:
sudo apt-get install libusb-1.0-0-dev
You also need libuvc
, which can be installed with the following commands:
git clone https://github.com/ktossell/libuvc
cd libuvc
mkdir build
cd build
cmake ..
make && sudo make install
Clone this repository in your catkin workspace.
This package depends on MAVLink. To initialize and check out the submodule, run this:
git submodule init
git submodule update --recursive
Build using catkin_make
according to the ROS instructions on http://ros.org.
Ubuntu comes with a serial modem manager which interferes heavily with any robotics related use of a serial port (or USB serial). It can deinstalled without side effects:
sudo apt-get remove modemmanager
To get proper permissions for the USB device, run the following script with the device attached:
sudo usermod -a -G dialout $USER
sudo ./fix_permissions.sh
Check the device vendor and product id from the list and enter them when prompted. The printed list has the format
... {idDevice:idProduct} ...
.
Log out of Ubuntu and Log back in. Unplug the device and plug it back in to load it with the new permissions.
roslaunch uvc_ros_driver uvc_ros_driver.launch
To flip the images horizontally, appropriately change the ros parameter defined in the launch file.
The stereo images and IMU messages will be published on the topic /vio_sensor
as a VioSensorMsg
defined in the ait_ros_messages
package.
If you need the images and IMU messages seperately, you can run
rosrun ait_ros_messages vio_sensor_republisher.py
This will publish the images and IMUs on the topics /left_image
, /right_image
, /imu
, respectively.