Coder Social home page Coder Social logo

knei-knurow / lidar-visualizations Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 13.77 MB

๐Ÿ“ Messing around with lidar.

Home Page: https://www.youtube.com/watch?v=MQhYTqz40xI

C++ 95.72% Makefile 3.88% Dockerfile 0.40%
lidar point-cloud rplidar rplidar-a3 sfml visualization

lidar-visualizations's People

Contributors

bartekpacia avatar doodek avatar dsonyy avatar knei-pl avatar krzysztofzawisla avatar pyguy2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lidar-visualizations's Issues

separate the components

I had this idea and I think it's cool:

lidar-vis should be broken into lidar-scan and lidar-vis

  • lidar-scan
    it just connects to the rplidar on port and outputs the data to stdout
  • lidar-vis
    basically current lidar-vis, but with rplidar-specific functionality stripped. It accepts data on stdin and visualizes them in a window

Advantages of this approach:

  • we would have 2 nice, tiny programs that do one thing and do it well instead of 1 bigger monolith
  • easier & faster development, because the parts are independent
  • cleaner and simpler code, uncluttered with ifdefs

lidar-scan

lidar-scan would be always compiled with rplidar_sdk (because it's main and only purpose is get data from lidar and print it to stdout).

Example lidar-scan usage

Perform a single scan and create a single cloud. Write output to stdout.
$ lidar-scan --port <lidar_port>

Perform a single scan and create a single cloud. Write output to some file.
$ lidar-scan --port <lidar_port> >> cloud.txt

Scan forever (until e.g CTRL+C) and create a cloud series. Write output to stdout.
$ lidar-scan --port <lidar_port> --series

lidar-vis

lidar-vis would be always compiled with SFML (because it's main and only purpose is to visualize lidar data).

It would work in 2 modes (like currently): file and file series

Example lidar-vis usage:

Visualize single cloud scan:

$ cat cloud.txt | lidar-vis

Visualize only the first 30 points of a single cloud scan:

$ head -n 30 cloud.txt | lidar-vis

Visualize cloud series scan:

$ cat cloud_series.txt | lidar-vis --series

Visualize live data from lidar:

$ lidar-scan --port <lidar_port> | lidar-vis --series

You see where it goes...basically unlimited flexibility with what we want to do with the data.

Save screenshots to a separate screenshots dir

This way, they won't clutter up the root dir and won't be accidentally added to .gitignore

so:

  • on screenshot button click, save a screenshot to /screenshots dir (when there is no such dir, create it)
  • add /screenshots do .gitignore

README and help message out of sync

The options in the README and program help menu are different โ€“ e.g --gui is only listed in README (but it indeed exists and works)

README:
Screenshot 2020-12-26 at 01 45 57

help message:
Screenshot 2020-12-26 at 01 47 24

Display help by default

I think the following behavior (i.e when no options/flags are passed) is a bit confusing:

screen

I'd suggest displaying help when no options/flags are passed.

Make *nix build

We need to be able to build the project on Unix-like systems (*nix).

Docker image can't be built.

Error:

Step 6/10 : RUN ./install_sfml
 ---> Running in 1f37aba2626c
./install_sfml: line 2: $'\r': command not found
./install_sfml: line 5: $'\r': command not found
./install_sfml: line 9: syntax error near unexpected token `$'{\r''
'/install_sfml: line 9: `_log() {
The command '/bin/sh -c ./install_sfml' returned a non-zero code: 2

Select code style

As the title says. If we want to have >1 developers working on this project, we need to use some simple-to-setup and use code formatting solution.

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.