Code Monkey home page Code Monkey logo

ouster_decoder's Introduction

ouster_decoder

This decoder is intended to extend the ouster_ros package from https://github.com/ouster-lidar/ouster_example

It has very low latency (<0.2ms) compared to ouster_example (>3ms), tested on Intel i7 11th gen cpu.

The decoder only supports LEGACY and single return profile. Currently there's no plan for dual return profile.

Important

The timestamp of both the cloud and image message is the time of the last column, not the first column. This is different from the official driver, which uses timestamp of the first column.

Usage

Run the ouster driver

roslaunch ouster_decoder driver.launch replay:=true/false

Then run the decoder

roslaunch ouster_decoder decoder.launch

The driver node is the same as the one from ouster_example except that it publishes a string message to topic /os_node/metadata that you should also record. When in replay mode, there's no need to specify a metadata file. The metadata file will still be saved in case one forgot to record the metadata message.

Decoder

The decoder allocates storge for a range image and a point cloud on startup. When receiving a packet, it fills the range image and the point cloud instead of doing all computations at the end of a sweep. This drastically redueces latency when publishing the cloud/image.

Each pixel in the range image has the following fields:

struct Data {
    float x;
    float y;
    float z;
    uint16_t r16u; // range
    uint16_t s16u; // signal
};

The corresponding point cloud has point type XYZI.

During each callback, we process the incoming packet and immediately decode and convert to 3d points. When we reach the end of a sweep, the data is directly published without any extra computations.

Therefore, the publish latency of our decoder is typically less than 0.2ms, while the ouster os_cloud_node takes more than 3ms to publish a point cloud.

Data Drops

Our decoder also checks for missing data. This is very useful for debugging purposes. The decoder tracks the frame and column id of each packet and reports any jumps (both forward and backward) if detected. The decoder then makes sure that missing data is zeroed out in the message.

Therefore, one can safely stop and replay a recorded rosbag without restarting the driver and decoder.

ouster_decoder's People

Contributors

iandouglas96 avatar versatran01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ouster_decoder's Issues

ghost points (unwanted points) in cloud generated

Hi @versatran01,
Thanks for this awesome package, I have one query, I have mounted Ouster OS0 on top of my quad and I am using this package to generate a point cloud, I am facing an issue where I am seeing points in the cloud just outside the blind zone set (to avoid getting propellers in the cloud)

I have set the min_range param to the radius of my drone to make sure props, prop guards are excluded from the final point cloud. I have placed exact measurements with some margins to incorporate measurement errors still I am seeing points just outside that boundary and they appear randomly. I have also used the OEM driver with box filter and observed similar noisy points, and this happens only when the sensor is mounted on top of the drone, on the bench, the sensor works fine.

have you faced anything similar?

Switch to fw2.4

fw2.4 for some reason switched to using nodelets. Could probably refactor driver to inherit and reuse some of the code to avoid duplication.

Incompatibility with ouster-ros v0.10.0+

Ouster removed the px_range and px_signal methods from the packet_format object highlighted in the CHANGELOG. I did a lot of digging to find a new way to get range and signal data from column buffer. I implemented a solution using the col_field method. Additionally, a transform also wanted the ros time so I added that. This fixed all the build issues but there are now some runtime issues since our metadata is out of data, that I'm still working through but would like to push to a branch.

I also used this as an opportunity for code cleanup and documentation.

Compilation error: fatal error: ouster_ros/OSConfigSrv.h: No such file or directory

Hello, I'm trying to build the package, but I got into trouble with the error

/home/zjnyly/catkin_ws/src/ouster_example/ouster_decoder/src/decoder.cpp:7:10: fatal error: ouster_ros/OSConfigSrv.h: No such file or directory
    7 | #include "ouster_ros/OSConfigSrv.h"
      |

I don't know where to find the file, because it is not included in the package.

I searched the file in ouster_example, but still can't find the file too. https://github.com/ouster-lidar/ouster_example/tree/master/ouster_ros

Can you help me with that? Thanks!

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.