catszeid / ardrone_control Goto Github PK
View Code? Open in Web Editor NEWControl of the ARDrone 2.0 using Leap Motion in ROS Indigo.
Control of the ARDrone 2.0 using Leap Motion in ROS Indigo.
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.
ardrone_control/scripts/leap_control.py
Line 231 in f00e5f8
Silent failure, log something here
ardrone_control/scripts/leap_control.py
Line 94 in f00e5f8
ardrone_control/scripts/leap_control.py
Line 214 in f00e5f8
Code reuse, make a function to reset the velocities.
ardrone_control/scripts/leap_control.py
Line 100 in f00e5f8
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 :)
ardrone_control/scripts/leap_control.py
Line 130 in f00e5f8
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.
ardrone_control/scripts/leap_control.py
Line 164 in f00e5f8
Here too.
ardrone_control/scripts/leap_control.py
Line 169 in f00e5f8
See if you can find some way to not set this every time.
ardrone_control/scripts/leap_control.py
Line 212 in f00e5f8
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.