Giter Club home page Giter Club logo

flashlight's People

Contributors

mikeroberts3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flashlight's Issues

Linux binaries

Hey! Thank you for uploading this, I am glad to see a good control library for quadrotors with really good looking viz. I wanted to play around with this, but I realized that the library files are Mach-O formats but I use Linux. I was wondering if you will be providing Linux complied versions of the libraries?

Otherwise I get this ..

ImportError: quadrotor_2d_H.so: invalid ELF header

failed to import module _transformations

When running any file that imports transformations.py. I get a user warning which says that it failed to run line 1902:

/home/arun/git_projs/flashlight/code/lib/flashlight/transformations.py:1888: UserWarning: failed to import module _transformations
  warnings.warn("failed to import module %s" % name)

Use of Trigonometric spline

@mikeroberts3000 : Pondering about the use case of trigonometric spline and its coefficients. Since I could not find documentation, I am asking here. Can you provide an an insight or at the least any reference.

sympy build

Thanks for this really great library! I'm excited to start using it! I was able to run the first example but I had to work around a couple of spots in sympy_utils.py which didn't work on my platform, anaconda python 2.7.15 with sympy 1.2 on OSX (with Apple's gcc).

Any advice on what I should change or what dependencies I should add on my platform? Thanks!

The workarounds I needed to run the first example are as follows:

First, after changing build_sympy_modules_on_import = True, line 476 raised an error:

'module' object has no attribute '_get_code_wrapper_class'

My hasty workaround for 476(without support for other backends):

-    CodeWrapperClass = sympy.utilities.autowrap._get_code_wrapper_class(backend)
+    if backend == "f2py":
+        CodeWrapperClass = sympy.utilities.autowrap.F2PyCodeWrapper
+    elif backend == "cython":    
+        CodeWrapperClass = sympy.utilities.autowrap.CythonCodeWrapper

Nominally, should build_module_autowrap not be running down that codepath? (I haven't taken any time to understand what's going on inside of it yet.)

I also am using osx's clang-/llvm gcc, without openmp installed, and had to edit a few other items:

  1. I had to remove the compile and link arguments to openmp, and also -fno-var-tracking-assignments in this template, since clang raises an error:
clang: error: unknown argument: '-fno-var-tracking-assignments'
  1. similarly I had to remove -fno-var-tracking-assignments and also remove the second instance of include_dirs here due to the following error:
extra_compile_args=['-std=c99','-fno-var-tracking','-fno-var-tracking-assignments'], include_dirs=[numpy.get_include()],
SyntaxError: keyword argument repeated

After these changes, the first example on the homepage worked.

Again, thanks so much for providing this library!

Update, 9/4/18

I did also try linking to openmp on my platform with brew install libomp. The brew formula comes with "caveat" instructions, quoting:

"On Apple Clang, you need to add several options to use OpenMP... This usually looks like
-Xpreprocessor -fopenmp -lomp"

So now my sympy_utils.py looks like this (in a blind attempt to follow the instructions without knowing proper OpenMP linking procedures):

-extra_compile_args = [ "-fopenmp", "-fno-var-tracking", "-fno-var-tracking-assignments" ]
-extra_link_args    = [ "-fopenmp" ]
+extra_compile_args = [ "-fno-var-tracking", "-Xpreprocessor", "-fopenmp", "-lomp" ]
+extra_link_args    = [ "-Xpreprocessor", "-fopenmp", "-lomp" ]

This does generate some clang warnings after setting build_sympy_modules_on_import = True (this time in quadrotor_3d.py which I did not build as part of my initial issue posting, since the first example on the homepage uses quadrotor_2d.py):

clang: warning: -lomp: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-Xpreprocessor -fopenmp' [-Wunused-command-line-argument]

In any case, I'm able to run the examples in this notebook so in the short-term I will wait to dig in further.

Script question

Hello!
Kindly, I want to as if I can, with Flashlight, impose inequality constraints on the first and second derivatives of the piecewise polynomial trajectory.
What I am aiming to do is to generate a snap optimized piecewise polynomial trajectory (based on a number of 3D waypoints), in which the zeroth (the minimum snap piecewise polynomial), the first (speed), and the second (acceleration) derivatives won't exceed a certain value.
Any example/guidance would be highly appreciated.

trajectory_optimization needed?

You don't seem to use any of the files from code/lib/flashlight/trajectory_optimization, just curious as to why it is there?

Thanks!

scipy interp1d usage out of date?

I was getting the following error from scipy.interpolate.interp1d() in interpolate_utils.resample_scalar_wrt_scalar():

 in reparameterize_curve
    t_user_progress_cubic = interpolate_utils.resample_scalar_wrt_scalar(l_cum_norm,t_p_linspace_norm,user_progress,kind="cubic")
  File "code/lib/flashlight/interpolate_utils.py", line 27, in resample_scalar_wrt_scalar
    x_new         = x_interp_func(t_new)
  File "scipy/interpolate/polyint.py", line 79, in __call__
    y = self._evaluate(x)
  File "scipy/interpolate/interpolate.py", line 664, in _evaluate
    below_bounds, above_bounds = self._check_bounds(x_new)
  File "site-packages/scipy/interpolate/interpolate.py", line 696, in _check_bounds
    raise ValueError("A value in x_new is above the interpolation "

ValueError: A value in x_new is above the interpolation range.

From this StackOverflow post I'm guessing this is from an update to scipy, so I have added in fill_value='extrapolate' in interpolate_utils.py:

-    x_interp_func = scipy.interpolate.interp1d(t,x,kind=kind)
+    x_interp_func = scipy.interpolate.interp1d(t,x,kind=kind, fill_value='extrapolate')

I am guessing this was the default behavior of the version of scipy that flashlight was written with, (but I haven't looked in scipy changelogs to check). The generated trajectory in the notebook example looks good though.

Thanks again for this great library! Excited to start using it more!

Platform info

I'm using scipy 1.1.0: on OSX:

$ conda list | grep scipy
scipy                     1.1.0           py27_blas_openblash7943236_201  [blas_openblas]  conda-forge

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.