GithubHelp home page GithubHelp logo

nxv11's Introduction

XV-11 test
Copyright 2010 Nicolas "Xevel" Saugnier

This repository contains the python visualizer, as well as the arduino sketch that spoofs a lidar (using a few full revolutions).

How to make the program work in demo mode :

- install VPython
- open XV-11_test.py in VIDLE (installed with VPython)
- set use_real_robot to False
- F5 to run. Maintain left+right mouse button + move the mouse up and down to zoom.

How to make the program work in live mode :

- install VPython
- install PySerial
- open XV-11_test.py in VIDLE (installed with VPython)
- set your COM port number (be careful, on Windows, COM5 has is the port number 4 ...)
- F5 to run. Maintain left+right mouse button + move the mouse up and down to zoom.


How to make an arduino spoof the lidar:

- program LidarSpoofing on your arduino (works on ATmega328 and better, get an older version if you have an ATMega168 base board), and update your com port

For better performances, you have to lower the latency (16ms by default on windows, 10ms on some Linux) of the COM port.
On windows, this is an advanced property of the COM port, accessible through the Device Manager.


How to extract your data to give them to the spoofer (from a Saleae Logic Scan, the long and not _too_ painful way):
- Open the session in Saleae Logic
- Choose "Analyser" > "Async Serial", set the correct channel and check "Use Autobaud"
- click the "Export Analyser Data" of the analyser you just created, save to a file
- copy the content (or just part of it) into an OpenOffice Calc spreadsheet, choose the comma as separator
- discard the column containing the time, and the headers if any.  Move the data to column B, remove all the leading blank lines if any
- save the spreadsheet in .CSV format, using a comma as field separator, and *nothing* as text separator
- select the part you want to use, copy it into the LidarSpoofing/data.pde file, replacing the current data, and update the number of sample (equal to the number of lines you selected). Be careful not to copy too much, the arduino has limited flash memory. And the max size of an array is 32K...
- program the arduino with this sketch, then run the python script. The last scan will probably be messed up, but it should go back to normal at the next revolution.





Licensing

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

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.