Giter Club home page Giter Club logo

compensator's Introduction

YDLIDAR

Table of Contents

  1. Introduction
  2. Usage
  3. IMU Frequency
  4. IMU Motion compensation Result
  5. Contact EAI

Introduction

Compensation is a library of lidar data distortion compensation when ydlidar lidar is installed on robot and in motion, Motion compensation needs to access high frequency IMU data or odometer data. The default input data direction is counterclockwise(Right-hand rule).

Usage

Compensator depends on YDLIDAR/YDLidar-SDK library. If you have never installed YDLidar-SDK library or it is out of date, you must first install YDLidar-SDK library. If you have installed the latest version of YDLidar-SDK, skip this step and go to the next step.

The core of Compensator is self-contained within a few Matrix files which you can easily compile in your application. They are all the files in the root folder of the repository (compensator.cpp, compensator.h etc.).

No specific build process is required. You can add the .cpp files to your existing project.

After Compensator is setup in your application, you can use it from anywhere in your program loop:

Code:

#include "compensator.h"
std::unique_ptr<Compensator> compensator_ = nullptr;

/**
* @brief  Odometer data message callback function
* @param odom odometry data
*/
void OdometryMsgCallback(const odometry_t &odom) {
  compensator_->InsertOdomMsg(odom);
}

/**
* @brief Laser Scan data message callback function
* @param scan Laser scan data
*/
void LaserScanMsgCallback(const LaserScan &scan) {
  LaserScan scan_compensated;
  if (compensator_->MotionCompensation(scan, scan_compensated)) {
  }
}


IMU Frequency

The most suitable formula for calculating the imu frequency is as follows:

$F_{imu} &gt;= \frac{S_{lidar}}{40 * F_{lidar}} * F_{lidar} &gt;= \frac{S_{lidar}}{40}$;

$F_{imu}$: IMU Frequency.

$F_{lidar}$: Lidar Frequency.

$S_{lidar}$: Lidar SampleRate.

Note:

  • When the sampling rate is large, the imu frequency can only greater than 100Hz.

IMU Motion compensation Result

In the following figure, the raw data of the red laser data on the left and the green data on the right are the data after motion compensation, The compensated graph rotates a fixed angle.

Compensation

Compensation1

Compensation2

Compensation3

Compensation4

Compensation5

Note:

  • IMU Frequency: 100Hz.
  • Lidar Frequency: 5Hz.
  • Lidar SampleRate: 4000

$F_{imu} &gt;= \frac{S_{lidar}}{40 * F_{lidar}} * F_{lidar} &gt;= \frac{S_{lidar}}{40}$ >= 4000/40 =100;

Contact EAI

Development Path

If you have any extra questions, please feel free to contact us

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.