Scythe goes open source
Turn up the music and set the LEDs to party mode: Scythe is excited to announce the launch of our first open source project! CANfetti is a CANopen compliant stack developed internally to overcome the limitations we faced when working with existing libraries. Written and refined over the past several years by Scythe’s firmware and software teams, CANfetti massively lowers the barrier to entry with an open source, easy to use, and production-grade library for robust CANopen communications in fields as varied as on- and off-road vehicles, industrial devices and, of course, robotics.
Scythe M.52, our fully autonomous commercial mower, uses a robust, automotive-grade CAN bus as a backbone of its communications system. To unify the range of specialized components in the mower – like advanced sensors, battery modules, and custom boards – and to handle the complex communication needs between them, we knew we’d have to leverage a higher level CAN protocol, like CANopen, DeviceNet or DroneCAN.
A number of our vendors already supported CANopen, making it a great fit for our application. Its own diversity of protocols (PDO, SDO, EMCY, etc.) further strengthened its use case for Scythe. But as advantageous as CANopen is, the available open source libraries were much harder to integrate than we wanted and had severe functional limitations, prompting us to build our own solution.
More like CAN’Topen
Current open source frameworks have APIs and designs that we found too constraining for integrating into M.52 in a consistent manner across both firmware and software. For example, CANopen has a powerful concept of an Object Dictionary, but previous open source frameworks only allowed a limited set of primitive fixed width types. This limited us to simple applications and lacked the ability to customize those types.
With CANfetti, in addition to the standard primitive types, we introduced the option to use dynamic OD types ranging from std::string to an index assignable callback which allows the application to completely control the reading and writing of an entry at the byte level. These dynamic types allow easier integration of complex runtime behavior.
Further, our significantly more flexible API for CANfetti makes integrating it into projects easier and faster. CANfetti provides engineers with a drop-in CANopen stack that doesn't get in the way and simply lets them build their system around it.
Other open source frameworks only partially implement the CANopen specification and have architectures that made extension to the rest of the spec a herculean effort. Not only is CANfetti a cleaner architecture and built using modern C++, but it supports a broader set of CANopen features like block mode which allows users to efficiently transfer larger contiguous blocks of data.
Lastly, in addition to lacking critical functionality, most open source CANopen libraries are no longer actively being developed. We unfortunately saw many abandoned libraries in various states of disrepair that were becoming rapidly outdated without community or commercial support. CANfetti represents the first step in our commitment to updating and expanding the open source firmware ecosystem.
Build the change you wish to see
Creating a much more robust CANopen compliant stack at Scythe allowed us to integrate critical components that weren’t previously compatible. For example, our motor controllers enable M.52 to get impressive precision and power from its deck and drive motors, but existing CANopen stacks weren't a fit for them. With CANfetti, we've been able to integrate these and other critical components into M.52, resulting in much better machine performance. And now we're open sourcing the stack to promote innovation in other great automation applications because we want to support the advancement of the field of robotics at large.
To make it as robust as possible, we designed CANfetti as a multi-platform CANopen stack that works across a wide range of architecture, from bare metal microcontrollers to multi-threaded Linux systems. Within M.52, CANfetti integrates with these platforms and more. Beyond M.52, CANfetti can be used for applications as diverse as railway logistics, maritime electronics and building automation because of its wide platform compatibility. By publishing CANfetti, we hope to help more companies that are building exciting, cutting-edge machines of all kinds by opening new possibilities for them.
🎊 🎊 🎊
CANfetti is just the start of our open source initiatives at Scythe. We’re excited to contribute to the open source community with such a robust, flexible CANopen stack and look forward to making more of our foundational software solutions publicly available. Until then, though, we hope that just like confetti after a party, we’ll find pieces of CANfetti all over the place, forever.