ROS1
Xvisio SDK Documentation Home Page

Xvisio ROS wrapper


Note:ROS wrapper supports OS Ubuntu20.04 and Ubuntu18.04. And also supports ROS1.

1. ROS System Introduction

ROS system is a set of software libraries and tools that help you build robot applications. From drivers to the most advanced algorithms, plus powerful development tools, ROS system includes everything you need for your next robot project. And it is open source.
ROS official website

2. Build ROS Environment

Please click here for building ROS wrapper environment and compiling.

3. Get ROS wrapper

In Xvisio SDK installation path: /usr/share/ros-wrapper/xv_sdk

4. Main Catalogue of ROS wrapper

  1. include: save ROS wrapper related header file directory
  2. launch:save ROS launch config file which used to run multiple executables in batch
  3. msg:save ROS topic customized communication format file
  4. rviz:save parameter config file required by ROS rviz
  5. src:save source code file
  6. srv:save ROS server customized communication format file
  1. Define ROS wrapper related function configuration in file include/xv_sdk/xv_sdk.hpp:
    #define NOT_USE_RGB
    #define NOT_USE_TOF
    //#define NOT_USE_SGBM
    #define NOT_USE_FE
    //#define USE_SLAM_PATH
    #define USE_SLAM_POSE
    //#define USE_MAPPING_ON_HOST
    
    #ifdef USE_SLAM_POSE
        #define ENABLE_POSE_WITH_CONFIDENCE
    #endif
    
    //#define ENABLE_SLAM_POSE_FACTOR_CONVERT
    //#define ENABLE_INFO_PRINT
    
    #ifndef NOT_USE_TOF
    #define TOF_QVGA
    #ifndef NOT_USE_RGB
        #define TOF_PC_WITH_RGB
    #endif/*NOT_USE_RGB*/
    #endif/*#ifndef NOT_USE_TOF*/
    
    #ifndef NOT_USE_SGBM
    #define USE_SGBM_POINTCLOUD
    //#define USE_SGBM_IMAGE
    
    #ifdef USE_SGBM_POINTCLOUD
        //#define DISPLAY_POINT_CLOUD_FPS
        #define SGBM_POINTCLOUD_UNIT_M
        //#define CONVERT_TO_WORLD_COORDINATE_SYSTEM
        //#define SGBM_PC_WITH_RGB
        #define SGBM_FIRMWARE_CLOUD
        #define ENABLE_LESS_POINT_CLOUD
    #endif/*#ifndef USE_SGBM_POINTCLOUD*/
    #endif/*#ifndef NOT_USE_SGBM*/
    
  2. Configuration introduction
    2.1 NOT_USE_RGB: define this macro to disable RGB related functions. Otherwise, annotate this macro to enable RGB camera related functions.
    2.2 NOT_USE_TOF: define this macro to disable TOF related functions. Otherwise, annotate this macro to enable TOF camera related functions.
    2.3 NOT_USE_SGBM: define this macro to disable SGBM related functions. Otherwise, annotate this macro to enable SGBM camera related functions.
    2.4 NOT_USE_FE: define this macro to disable Fisheye camera related functions. Otherwise, annotate this macro to enable Fisheye camera related functions.
    2.5 USE_SLAM_PATH: If this macro is defined, this node provides the topic of the slam pose. If this macro is annotated, the topic of the slam track is not provided externally.
    2.6 USE_SLAM_POSE: If this macro is defined, this node provides the topic of the slam track. If this macro is annotated, the topic of the slam pose is not provided externally.

6. ROS wrapper Service and Topic

6.1 Services provided by Ros wrapper:

Function Service Description
SLAM /xv_sdk/xv_dev/slam/start start SLAM
/xv_sdk/xv_dev/slam/stop stop SLAM
/xv_sdk/xv_dev/slam/get_pose get slam pose
/xv_sdk/xv_dev/slam/get_pose_at get sometime slam pose
/xv_sdk/xv_dev/slam/load_map_cslam load map and switch to cslam
/xv_sdk/xv_dev/slam/save_map_cslam save map and switch to cslam
SGBM /xv_sdk/xv_dev/sgbm_camera/start start SGBM camera
/xv_sdk/xv_dev/sgbm_camera/stop stop SGBM camera
IMU /xv_sdk/xv_dev/imu_sensor/get_orientation enable IMU 3DOF
/xv_sdk/xv_dev/imu_sensor/get_orientation_at get sometime IMU 3DOF
/xv_sdk/xv_dev/imu_sensor/start_orientation enable IMU 3DOF
/xv_sdk/xv_dev/imu_sensor/stop_orientation disable IMU 3DOF
RGB /xv_sdk/xv_dev/color_camera/start enable RGB camera
/xv_sdk/xv_dev/color_camera/stop disable RGB camera
TOF /xv_sdk/xv_dev/tof_camera/start enable TOF camera
/xv_sdk/xv_dev/tof_camera/stop disable TOF camera

6.2 Topics provided by Ros wrapper:

Function Topic Description
SLAM /xv_sdk/xv_dev/slam/pose slam pose
/xv_sdk/xv_dev/slam/stereo_planes slam fisheye camera plane
/xv_sdk/xv_dev/slam/tof_planes slamTOF camera plane
/xv_sdk/xv_dev/slam/trajectory slam trajectory
SGBM /xv_sdk/xv_dev/sgbm_camera/camera_info SGBM camera information
/xv_sdk/xv_dev/sgbm_camera/image_sgbm SGBM image
/xv_sdk/xv_dev/sgbm_camera/point_cloud SGBM point cloud
RGB /xv_sdk/xv_dev/color_camera/camera_info RGB camera information
/xv_sdk/xv_dev/color_camera/image_color RGB image
Fisheye camera /xv_sdk/xv_dev/fisheye_cameras/left/camera_info left fisheye camera information
/xv_sdk/xv_dev/fisheye_cameras/left/image left fisheye camera information
/xv_sdk/xv_dev/fisheye_cameras/right/image right fisheye camera information
/xv_sdk/xv_dev/fisheye_cameras/right/camera_info right fisheye camera information
IMU /xv_sdk/xv_dev/imu_sensor/data_raw IMU 6DOF
/xv_sdk/xv_dev/imu_sensor/orientation IMU 3DOF
TOF /xv_sdk/xv_dev/tof_camera/camera_info TOF camera information
/xv_sdk/xv_dev/tof_camera/image TOF image
/xv_sdk/xv_dev/tof_camera/point_cloud TOF point cloud

7. Rviz Display

  1. Rviz sgbm demo display
    rosrun rviz rviz -d `rospack find xv_sdk`/rviz/sgbmdemo.rviz
    
  2. Rviz demo display
    rosrun rviz rviz -d `rospack find xv_sdk`/rviz/demo.rviz
    
  3. Rviz slam demo display
    rosrun rviz rviz -d `rospack find xv_sdk`/rviz/demo-slam.rviz
    
  4. Rviz tof demo display
    rosrun rviz rviz -d `rospack find xv_sdk`/rviz/tofdemo.rviz
    

ROS1
Xvisio SDK Documentation Home Page