SymForce: Symbolic Computation and Code Generation for RoboticsHayk Martiros, Aaron Miller, Nathan Bucki et al.
We present SymForce, a library for fast symbolic computation, code generation, and nonlinear optimization for robotics applications like computer vision, motion planning, and controls. SymForce combines the development speed and flexibility of symbolic math with the performance of autogenerated, highly optimized code in C++ or any target runtime language. SymForce provides geometry and camera types, Lie group operations, and branchless singularity handling for creating and analyzing complex symbolic expressions in Python, built on top of SymPy. Generated functions can be integrated as factors into our tangent-space nonlinear optimizer, which is highly optimized for real-time production use. We introduce novel methods to automatically compute tangent-space Jacobians, eliminating the need for bug-prone handwritten derivatives. This workflow enables faster runtime code, faster development time, and fewer lines of handwritten code versus the state-of-the-art. Our experiments demonstrate that our approach can yield order of magnitude speedups on computational tasks core to robotics. Code is available at https://github.com/symforce-org/symforce.
Design and Control of a Midair-Reconfigurable Quadcopter using Unactuated HingesNathan Bucki, Jerry Tang, Mark W. Mueller
A novel quadcopter capable of changing shape mid-flight is presented, allowing for operation in four configurations with the capability of sustained hover in three. This is accomplished without requiring actuators beyond the four motors typical of a quadcopter. Morphing is achieved through freely-rotating hinges that allow the vehicle arms to fold downwards by either reducing or reversing thrust forces. Constraints placed on the control inputs of the vehicle prevent the arms from folding or unfolding unexpectedly. This allows for the use of existing quadcopter controllers and trajectory generation algorithms with only minimal added complexity. For our experimental vehicle at hover, we find that these constraints result in a 36% reduction of the maximum yaw torque the vehicle can produce, but do not result in a reduction of the maximum thrust or roll and pitch torques. Experimental results show that, for a typical maneuver, the added limits have a negligible effect on trajectory tracking performance. Finally, the ability to change configurations is shown to enable the vehicle to traverse small passages, perch on hanging wires, and perform limited grasping tasks.
Rapid Collision Detection for Multicopter TrajectoriesNathan Bucki, Mark W. Mueller
We present a continuous-time collision detection algorithm for quickly detecting whether certain polynomial trajectories in time intersect with convex obstacles. The algorithm is used in conjunction with an existing multicopter trajectory generation method to achieve rapid, obstacle-aware motion planning in environments with both static convex obstacles and dynamic convex obstacles whose boundaries do not rotate. In general, this problem is difficult because the presence of convex obstacles makes the feasible space of trajectories nonconvex. The performance of the algorithm is benchmarked using Monte Carlo simulations, and experimental results are presented that demonstrate the use of the method to plan collision-free multicopter trajectories in milliseconds in environments with both static and dynamic obstacles.