-
Notifications
You must be signed in to change notification settings - Fork 0
Home
In this wiki we will be reviewing the FlashLib library - its features and functionalities, advanteges and disadvanteges; and learn about robot development.
FlashLib is a robotics software development library for Java and C++. It provides various tools and features for developers, making the creation of robotics solutions much easier.
Initially, FlashLib was developed specifically for use in the FIRST Robotics Competition (FRC), but over time it has grown and can now provide the same services for non-FRC robots.
FlashLib is an open-source library. Our main aim for the library is community development, and as such, we welcome anyone who wants to contribute. We have several guidelines for contibution, which were placed to avoid misunderstandings or some other issues. The guidlines are specified in CONTRIBUTING.md. In addition, we use a BSD license and hence FlashLib is free for both academic and commercial use.
FlashLib provides a lot of features for users, some can even be used for non-robot projects.
The robot framework provides a base for running and controlling robots and managing operations on the robot with ease. In addition to that, users have access to control loops, algorithms and more, all of which is completely optional. So basically, it is possible to immediately jump into creating a software without worring about planning the robot control.
FlashLib uses a control loop for robot control. Users define control modes for their robot and the framework runs a continous loop which execute user code for the appropriate operation mode when necessary. Selecting operation modes depends on users, because there are many ways choose modes. So it is possible to set the mode from the robot, or an entirely different and remote software.
Most robots have multiple systems, each performing a different task at the same time, and controlling that from code can sometimes get messy. Because of that, FlashLib introduces a scheduling system which allows users to execute and schedule tasks for multiple robot systems quickly. Using the scheduling system allows for quick execution of a dozen different tasks, something that can be incredibly useful with autonomous robots.
Please refer to the Robot Scheduling System page for further information.
Sometimes manual control is wanted for the robot, and this too, is already taken care of. FlashLib provides an HID package, filled with different types of controls and execution tasking. The actual retrival of HID data is abstracted, so users can read data from controllers however they like.
There are tons of actuators available for robots, so FlashLib provides general implementations for controlling them. In addition, FlashLib provides an abstraction for actuator types, so it is very simple to integrate actuators into FlashLib systems.
Like actuators, many sensors exist, so FlashLib integrates sensors using abstract control. That way, any sensor can be used alongside FlashLib. In addition, several sensors are already implemented in FlashLib.
FlashLib features several awesome control algorithms which provide control of popular drive systems, such as: tank drive, mecanum drive, etc; as well as autonomous motion algorthims for sensor-based operation.
FlashLib provides a build-in PID controller, allowing users to control the robot's operation more relaibly. The controller itself is used in FlashLib's motion algorithms extensively.
To allow users to code a robot once and use it on any platform, FlashLib introduces the Hardware Abstraction Layer. The HAL provides an abstract layer with changable implementations so that interacting with hardware and electronics would not require rewritting code. Note that because of the amount of platforms available, FlashLib cannot provide implementations for all of them, so users might have to implement their own hardware code.
You can read more about it in this wiki page.
Humans are considered social creatures and like them, robots need to communicate too. So when our robot software need to communicate with a remote software, we need to create something to send and receive data as well as manage the data accordingly. Instead of always needing to do so, FlashLib introduces the Communication Management System which allows users to communicate with remote softwares and easily manage incomming data on both sides.
Check out the systems wiki page for more information.
Image processing is awesome. It copies the power of the human eyesight and allows our robot to collect more data from its surroundings. But, for all its merits, it is extremely difficult to code. So FlashLib introduces the Dynamic Vision System which makes image processing a lot easier to execute and control.
You can read this wiki page for more information.
Manually controlling a robot can be difficult (from experience) and to perform certian tasks, operators need access to sensor information or visual data. So like car drivers, they need a dashboard. Flashboard is a smart dashboard software which provides that and more.
You can read all about it here.
To start developing robot software using FlashLib, please refer to here.
For FlashLib usage in FRC robots, read this page.
FlashLib uses version 4.1
of the Gradle build tool for building. It is not necessary to install it if not installed already, instead it is possible to use the gradle wrapper provided with the library. When using installed gradle, use the gradle
command to use it. If using the wrapper, instead of the command use gradlew.bat
in windows and ./gradlew
in linux.
To build all of FlashLib, simply run gradle build
(or gradlew.bat build
/ ./gradlew build
) in the root directory of the project. But, it is possible to build only parts of the library depending on which is wanted.
Flashlibj is the Java port of FlashLib and is located under the flashlibj
folder. To build only this part, run gradle :flashlibj:build
(or gradlew.bat :flashlibj:build
/ ./gradlew :flashlibj:build
) in the root directory of FlashLib. Binaries can be found under build/libs
:
-
flashlib.jar
: The main library file. In this archive all the compiled java files of FlashLib are located. To use FlashLib for Java, this Jar is necessary. -
flashlib-sources.jar
: The sources archive. Contains all the source files from FlashLib's Java port. It is possible to use this Jar with the main library in an IDE in order to view the library source files when coding, but it is only recommended. -
flashlib-javadoc.jar
: The Javdoc archive. Contains all the Javadic files from FlashLib's Java port. It is possible to use this Jar with the main library in an IDE in order to view the library documentation when coding, but it is only recommended.
Flashboard is the dashboard software from FlashLib and is located under the flashboard
folder. To build only this part, run gradle :flashboard:build
(or gradlew.bat :flashboard:build
/ ./gradlew :flashboard:build
) in the root directory of FlashLib. Flashboard depends on Flashlibj and will compile its main Jar archive as well. Binaries can be found under build/flashboard
, which is the distribution folder.
To run flashboard, simply run the run.bat
file on windows or run
file on linux.
HAL is the FlashLib Hardware Abstract Layer and is located under the hal
folder. HAL is made up of several small parts, each is a different implementation of the layer. It is possible to build each layer separately by running gradle :hal:impl_name:build
(or gradlew.bat :hal:impl_name:build
/ ./gradlew :hal:impl_name:build
) where impl_name
is the name of the implementation to build (names are determined by the name of the folder which contains the implementation). Binaries for each implementation are located under build/impl_name/libs/flashlib_hal
.