Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.64 KB

how_to_use_coordinate_transformation.md

File metadata and controls

71 lines (52 loc) · 1.64 KB

How to use coordinate transformation

1 Introduction

rslidar_sdk can transform the coordinate of point cloud. This document illustrate how to do so.

Please check the Intro to hiding parameters for more details. Here is an example of the config.yaml.

2 Dependencies

rslidar_sdk depends on the libeigen library to do coordinate transformation. Please install it first.

sudo apt-get install libeigen3-dev

3 Compile

To enable transformation, set the CMake option ENABLE_TRANSFORMto be ON.

  • Compile directly

    cmake -DENABLE_TRANSFORM=ON ..
  • ROS

    catkin_make -DENABLE_TRANSFORM=ON
  • ROS2

    colcon build --cmake-args '-DENABLE_TRANSFORM=ON'

4 Set LiDAR parameters

In the lidar-driver part of config.yaml, set the hiding parameterx, y, z, roll, pitch ,yaw.

common:
  msg_source: 1                                       
  send_packet_ros: false                                
  send_point_cloud_ros: true                            
  send_packet_proto: false                              
  send_point_cloud_proto: false                         
lidar:
  - driver:
      lidar_type: RS128            
      msop_port: 6699              
      difop_port: 7788             
      start_angle: 0               
      end_angle: 360             
      min_distance: 0.2            
      max_distance: 200           
      use_lidar_clock: false       
      pcap_path: /home/robosense/lidar.pcap     
      x: 1
      y: 0
      z: 2.5
      roll: 0.1
      pitch: 0.2
      yaw: 1.57

5 Run

Run the program.