Kinovarobotics / ros_kortex_vision

ROS package for KINOVA® KORTEX™ arms vision module
BSD 3-Clause "New" or "Revised" License
32 stars 35 forks source link

Kinova Vision module package

Overview

This ROS package provides helper methods and launch scripts to access the Kinova Vision module depth and color streams.

Installation (using catkin)

The following instructions are for ROS Kinetic Kame, running under Ubuntu 16.04

Building from Source

Dependencies

GStreamer packages
sudo apt install gstreamer1.0-tools gstreamer1.0-libav libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-base
ROS package
sudo apt-get install ros-kinetic-rgbd-launch

Building

To build from source, clone the latest version from this repository into your catkin workspace and compile the package.

  1. Create a catkin workspace
    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws/src/
  2. Clone this git repo into ~/catkin_ws/src
    git clone https://github.com/Kinovarobotics/ros_kortex_vision.git
    cd ~/catkin_ws/src/
    catkin_init_workspace 
    cd ..
    catkin_make clean
    catkin_make
    catkin_make install
    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    source ~/.bashrc

Usage

Start roscore (if not already started)

roscore

Start kinova_vision node

roslaunch kinova_vision kinova_vision.launch

Refer to the Launch files section to see the available launch files.

Start rviz to view both cameras

rosrun rviz rviz

Refer to the Rviz configuration files section to see the configuration files for viewing streams in rviz.

Alternatively, use image_view to view a camera stream:

rosrun image_view image_view image:=/camera/color/image_raw
rosrun image_view image_view image:=/camera/depth/image_raw

The image argument specifies the image topic to subscribe to.

Refer to the Nodes section to see the published topics using the message type sensor_msgs/Image.

Launch files

Specifying launch options

It's possible to override the default argument values when launching the kinova_vision node.

Arguments are set using the following syntax: <argument>:=<value>.

For instance, the default value of the device argument can be overridden to specify another IP address.

roslaunch kinova_vision kinova_vision_rgbd.launch device:=10.20.0.100

Additional information on arguments color_camera_info_url and depth_camera_info_url

These arguments specify the custom camera information file to use instead of the default camera information file.

The file is specified via a specific URL syntax, using either of these two formats:

package://<package_name>/relative/path/to/file

file:///absolute/path/to/file

For example:

roslaunch kinova_vision kinova_vision_rgbd.launch color_camera_info_url:=file:///home/user/custom_color_calib_1280x720.ini depth_camera_info_url:=file:///home/user/custom_depth_calib_480x270.ini

A custom camera information file is typically created from a default information file (refer to launch/calibration/default_*.ini). Then, one simply needs to adjust the proper matrices.

The following matrices need to be adjusted with the proper values for FX, FY, PPX, PPY:

camera matrix
FX 0.00000 PPX
0.00000 FY PPY
0.00000 0.00000 1.00000

projection
FX 0.00000 PPX 0.00000 
0.00000 FY PPY 0.00000 
0.00000 0.00000 1.00000 0.00000 

The values for FX, FY, PPX, PPY can be obtained via the Vision module API. They represent the focal length and the principal point offset in both the x and y coordinates.

Rviz configuration files

color_only.rviz.png

depth_only.rviz.png

depth_and_color.rviz.png

depth_and_color_rgbd.rviz.png

Nodes

kinova_vision_color

This node publishes the raw stream and the meta information of the color camera.

Subscribed Topics

None

Published Topics

kinova_vision_depth

This node publishes the raw stream and the meta information of the depth camera.

Subscribed Topics

None

Published Topics

camera_color_tf_publisher

This node publishes the static coordinate transformation between the color camera frame (camera_color_frame) and the camera link frame (camera_link).

Subscribed Topics

None

Published Topics

camera_depth_tf_publisher

This node publishes the static coordinate transformation between the depth camera frame (camera_depth_frame) and the camera link frame (camera_link).

Subscribed Topics

None

Published Topics

camera_nodelet_manager

This node uses rgbd_launch package to create a nodelet graph, transforming raw data from the device driver into point clouds, rectified images, and other products suitable for processing and visualization.

Subscribed Topics

Published Topics