Code Monkey home page Code Monkey logo

lidar_turret's Introduction

LiDAR_Turret - Automatic Pan & Tilt

Python Code for our LiDAR Turret, Version 1.

Pan_and_tilt.py

This code is our primary Python script that enables us to scan with our LiDAR Turret. In its current form, when you begin the Python Script the turret will automatically reset its position to begin at the MINIMUM POSITION VALUE (default is 225 degrees). This is a number between 0-4095 that correpesonds to the motor position. For reference, for the Tilt Motors (DXL_ID = 2 , 3), if we want the motor at 180 degrees, parrallel to the floor, the position value corresponds to 2030. These numbers can be clarified with the Dynamixel Wizard 2.0 software. From here the microcontroller will add values to its PRESENT POSITION until it reaches its GOAL POSITION. The default goal position at the begining is the MAXIMMUM POSITION VALUE.(Default is currently 135 degrees) When the motor finshes panning from left to right, from MINIMUM POSITION TO MAXIMUM POSITION, it will tilt apprx 1 degree upwards. Then it will set the new GOAL POSITION as the original MINIMUM POSITION and reverse sweep. This process continues until the tilt motors reach a pretermined angle, established in the code.

All of the above POSITIONS are established in the code before running the Python Script. More detail for what values must be changed are available in the comments of the code itself.

Other elements that need to be altered in the code beforehand are the serial USB Port. (For example Windows uses COM7 or something close to it)

Simple_input.py

This code is used to set the turret to aim at a particular angle. Much of the code is similar to the above Pan_and_tilt script. Key difference is that when started it will ask for an angle and then proceed to aim the turret at that angle. ANd won't move until given a new target angle.

Angle Cheat Sheet(Pan) Uploaded Below:

Turret Orientation

# Angle Cheat Sheet(Tilt) Uploaded Below:

Turret Angles_SideView

lidar_turret's People

Contributors

dmcguire123 avatar davidjsiegel avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.