Giter Site home page Giter Site logo

ardrone_control's People

Contributors

catszeid avatar

Stargazers

 avatar

Forkers

skaputsos

ardrone_control's Issues

Code review with muh bros

For this code review, remember that we both want your code to get better. This is constructive criticism, and if you disagree with something, then you can explain yourself. Keep a level head and let's git gud together.

Silent failure, log something here

vel_msg.linear.x = 0.0

vel_msg.linear.x = 0.0

Code reuse, make a function to reset the velocities.

if (len(hands) > 0):

Here, what I'd do is check if the number of hands is zero, and then continue if it is. This keeps the rest of the function at the base level and easier to read. This might not be the correct thing to do, but take a look at it and defend your reason in a comment :)

if (first_hand.is_right):

Assign the r_roll_offset_left or l_roll_offset_left to a variable in the if block depending on what hand it is, and then use that variable in the following block. This will reduce code reuse.

if (first_hand.is_right):

Here too.

See if you can find some way to not set this every time.

if (not moved):

Do you need to reset this here? Is moved ever not set if you have moved? You might be able to get rid of this block of code and the moved variable if that's the case.

You've got a good start here, and I'd love to see more of this in action.

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.