[HN Gopher] Show HN: SymForce - Fast symbolic computation, code ...
       ___________________________________________________________________
        
       Show HN: SymForce - Fast symbolic computation, code generation, and
       optimization
        
       Author here. I'm unreasonably excited to share this library that
       we're open-sourcing today -- our team has been building it for five
       years and these ideas have been a passion of mine for fifteen.
       SymForce is a library that makes it easy to code a problem once in
       Python with an augmented SymPy API (backed by C++), experiment with
       it symbolically, generate optimized code in C++ or any backend
       language, and then run highly efficient nonlinear optimization
       problems based on the original problem definition. This workflow
       elegantly solves a wide variety of tasks in robotics and related
       domains, and can speed up common tasks by an order of magnitude
       while requiring less handwritten code and reducing the surface area
       for bugs. See our paper at https://arxiv.org/abs/2204.07889 for
       experiments (accepted to RSS 2022).  We developed it at Skydio for
       real-time robotics algorithms like SLAM, calibration, bundle
       adjustment, MPC, and system identification on our drones. It's a
       key pillar of our autonomy stack that has accelerated our iteration
       cycle from prototypes to production systems. We are releasing it to
       benefit the open-source community, and think its components are
       useful to anyone writing algorithmic code, like students, research
       teams, and tech companies.  You can pip install it, play around
       with a formulation in a notebook, and deploy production code in a
       couple of hours. Try it at https://github.com/symforce-org/symforce
        
       Author : haykmartiros
       Score  : 46 points
       Date   : 2022-05-24 16:38 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | ebaabe wrote:
       | This is super awesome! Can't wait to see what it enables!
        
       | albertzeyer wrote:
       | How does it compare with TensorFlow (graph-based, i.e. symbolic)
       | or Theano? Or maybe also JAX, which you could also see as
       | symbolic.
       | 
       | In the paper it is briefly mentioned that TensorFlow/JAX are
       | slower due to more overhead? I doubt this is true. Also,
       | TensorFlow could be compiled to TF-lite or XLA and then C++ or
       | whatever you like. Same for JAX.
       | 
       | It is also mentioned that TensorFlow/JAX perform poorly on
       | second-order optimization. But this is not true.
       | 
       | Further, it is said that TensorFlow/JAX have poor performance for
       | sparse matrices. While the performance is not great, I am not
       | sure that other frameworks would perform faster.
       | 
       | Some fair benchmarks would be nice.
       | 
       | But then, despite just benchmarks, also a more direct comparison
       | on a conceptual level would be nice. Because from the
       | description, I don't directly understand how it is much
       | different.
        
       | linty_samosa wrote:
       | Fascinating and incredibly exciting -- can't wait to see how the
       | world uses this library
        
       | themonteray wrote:
       | Super cool! How does this compare with Casadi? I didn't see it
       | mentioned in the related AD frameworks in the paper, but I think
       | that targets a similar niche? Thanks for releasing the library!
        
         | haykmartiros wrote:
         | I think Casadi is solid. Primarily, I'd say Casadi is more
         | specialized towards optimal control. To my knowledge it's much
         | easier in SymForce to formulate complex objectives (ex:
         | involving 3D poses, camera projections, Lie group operations),
         | and has a more flexible code generation system that can
         | generate structured APIs in multiple languages.
        
       | rurban wrote:
       | Well done, thanks a lot
        
       | crubier wrote:
       | I think the approach makes a lot of sense. In the past I've been
       | using Matlab and Mathematica to solve robotics / trajectories
       | problems symbolically and then generate code from the solutions,
       | as big fat inlined functions.
       | 
       | Having a toolbox based on modern open source and widely adopted
       | tools like Sympy to do this automatically is super powerful.
        
       | captaindiego wrote:
       | I've been cobbling together crappy things to do similar things
       | for robot kinematics a lot, this looks awesome, thank you!
        
       | [deleted]
        
       ___________________________________________________________________
       (page generated 2022-05-24 23:00 UTC)