Crates.io | rrtk |
lib.rs | rrtk |
version | |
source | src |
created_at | 2024-03-12 07:02:18.012405 |
updated_at | 2024-11-10 20:22:06.825886 |
description | Rust Robotics ToolKit |
homepage | |
repository | https://github.com/UxuginPython/rrtk |
max_upload_size | |
id | 1170257 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A set of algorithms and other tools for robotics in Rust.
It is almost entirely no_std
and most things work without alloc
. It does not currently integrate with any API directly. This may be added in the future, probably through another crate.
This basically means that you can do whatever you want as long as you give me attribution and you don't remove the license notices or use my name to endorse stuff I don't. Read the actual license for details though.
RRTK was previously licensed under LGPL. Versions 0.5.0-alpha.1 and earlier have been retroactively dual licensed under LGPL-3.0-only OR BSD-3-Clause. Versions after 0.5.0-alpha.1 are just BSD-3-Clause. This transition does not remove any freedoms, and the LGPL for old versions is maintained solely due to its irrevocability. It is entirely redundant freedoms-wise.
Getter
, Settable
, and Updatable
traitsRRTK Stream Builder now available: Code generation from visual nodes for the stream system.
Initial release.
Fix motion profile issue.
Start new motor-encoder system.
Function for motors to follow motion profiles.
Allow the user to run a custom update loop for motion profile following as an alternative to the single function.
Add an update method to encoders.
Add an update method to motors, allow easier detection of parts of motion profiles, and reorganize the package to use features with the motor-encoder system in a module.
Start new stream system.
Reorganize a bit and add EWMA stream.
Add moving average stream.
SumStream
and ProductStream
MovingAverageStream
PIDControllerShift
a constantMotionProfileState
with MotionProfilePiece
History
trait, which is like a Stream
but you specify a time when you get
std
requirement for a couple typesStream
and the previous device system to Getter
and Settable
. Getter
is like a stream or encoder and Settable
is like a writable device.Device
type which makes raw Getter
s and Settable
s work together better as mechanical devices in a system. This should represent a physical device.Axle
type which contains multiple Device
objects. It uses the capabilities of each device to control the real-life system. Eg. Data is gathered from Getter
devices (Device::Read
for encoders and Device::ReadWrite
for servos) and used to control motors that do not contain their own control theory processing (Device::ImpreciseWrite
), but motors that can do this on their own (Device::ReadWrite
and Device::PreciseWrite
depending on whether the internal data can be read) do not need this control. This object should represent a physical linkage between devices.f32
s.Settable
able to follow Getter
s of the same type.GetterFromHistory
struct allowing History
objects to be used as Getter
s.set_delta
and set_time
methods to GetterFromHistory
.streams::Constant
to ConstantGetter
.Settable
for ConstantGetter
.get_last_request
method to Settable
.MotionProfile
get_*
methods to Option
instead of Result
.UpdateOutput
to NothingOrError
.Axle
bug where it would try to use nonexistent PID controllers for Device::ImpreciseWrite
objects if it had not yet received a Command
.set
in Settable
, you now implement direct_set
. You should still call just set
though. This is a workaround required to make SettableData
and get_last_request
work correctly.MotionProfile
to History<Command, E>
instead of History<State, E>
.i64
instread of f32
. The recommended unit is nanoseconds. This is not u64
due to the use of deltas.MovingAverageStream
panicing issue.StreamPID
to PIDControllerStream
.PIDControllerStream
.Error
enum as non-exhaustive.MotionProfile
a return value after it has completed. This is based on the end state provided to the constructor. It will choose the lowest possible position derivative to satisfy the end state. This means that if acceleration is 0, the position derivative in the command will be velocity, otherwise acceleration. If velocity is also 0, it will be position, otherwise just velocity.get_(position|velocity|acceleration)
methods to Command
.Latest
stream allowing you to choose the output of whichever of a set of streams has the later timestamp.From<State>
for Command
.TimeGetterFromStream
to TimeGetterFromGetter
.core::ops
traits and Copy
for State
PositionToState
MotionProfile
and (Position|Velocity|Acceleration)ToState
by removing unnecessary code&RefCell<Terminal>
rather than Rc<RefCell<Terminal>>
SettableCommandDeviceWrapper
and GetterStateDeviceWrapper
allowing types only implementing Settable<Command, _>
to be used as motors and types only implementing Getter<State, _>
to be used as encoders.PositionDerivativeDependentPIDKValues
, now with a get_k_values
method for getting the k-values for a specific position derivative.evaluate
methods for PIDKValues
and PositionDerivativeDependentPIDKValues
.CommandPID
, an easier and faster way to use PID control to turn a standard DC motor and an encoder into a de facto servo.latest
function which gets the newer of two Datum
objects.streams
submodules flow
and logic
.Expirer
flow::IfStream
flow::IfElseStream
flow::FreezeStream
logic::AndStream
logic::OrStream
logic::NotStream
Not
for Datum<T>
where T
implements Not
.NoneGetter
.Axle
very similar to 0.4.0-alpha.1 one.(SettableCommand|GetterState)DeviceWrapper
to devices::wrappers
module.Device
implementor for a differential mechanism.GetterSettable
marker trait.devices
feature.devices
module.Box
ing from InputGetter
and InputTimeGetter
.following_update
to update_following_data
and remove update
calls from it.GetterFromHistory
use &mut dyn History
instead of Box<dyn History>
and make its constructors take impl History
instead of dyn History
.new_for_motion_profile
constructor for GetterFromHistory
.Clone
bound on History<T, _>
's T
.GetterFromHistory
return the requested timestamp as its Datum
timestamp rather than that that the internal History
returns.make_input_getter
and make_input_time_getter
functions instead of macros.NoneGetter
constructor. (It is a unit struct, so this is redundant.);disconnect
method to Terminal
.Terminal
's get
implementation by using an array of MaybeUninit
rather than Vec
.Invert
get_terminal_2
which was returning terminal 1.SettableCommandDeviceWrapper
to ActuatorWrapper
.ActuatorWrapper
update its inner Settable
.ActuatorWrapper
call update_terminals
in its Updatable
implementation.CommandPID
error integral doubling bug.TerminalData
type containing a timestamp, an optional command, and an optional state.Getter<TerminalData, _>
for Terminal
.PIDWrapper
, a wrapper very similar to ActuatorWrapper
that uses a CommandPID
to control a DC motor rather than needing a servo or a control system set up by the user.TimeGetter
for i64
. It will always return its value as a time.CannotConnectTerminals
error variant.GetterStateDeviceWrapper
update its inner Getter
.CommandPID
from resetting itself whenever it gets a new command rather than only when the command is different.State
, Datum
, PIDKValues
, PositionDerivativeDependentPIDKValues
, and Command
as const
.Reference
type that can hold a *mut T
, Rc<RefCell<T>>
, or *const RwLock<T>
, allowing you to not need a dynamic allocator.alloc
feature.devices::wrappers::PIDWrapper
. It will be back by the time this is stable.Clone
for Reference
to_dyn!
macro for creating Reference<dyn Trait>
objects.rc_refcell_reference
and macros static_reference!
and static_rwlock_reference!
which work similarly to the former make_input_getter
. They put their input into a container if required and then return a Reference
to it.?Sized
. This allows the use of Reference<dyn Getter<_, _>>
and Reference<dyn TimeGetter<_, _>>
in the builtin streams.PIDWrapper
back.Reference
.ArcRwLock
, PtrMutex
, and ArcMutex
Reference
variants.ref_cell
and rw_lock
.*const RwLock
is ptr_rw_lock
, not rw_lock_ptr
.Reference
variants.
Reference
to ReferenceUnsafe
.
borrow
and borrow_mut
methods of ReferenceUnsafe
unsafe.ReferenceUnsafe
under the name Reference
.
Reference
(the wrapper struct) cannot be constructed with a raw pointer without an unsafe block or a macro that ensures that the pointer's target is static.Reference
has all of the same methods as ReferenceUnsafe
except that borrow
and borrow_mut
are safe.Reference
has one additional method, into_inner
, which returns its inner ReferenceUnsafe
.SumStream
and ProductStream
to not require alloc
.rrtk::reference::to_dyn!
and rrtk::to_dyn!
as valid paths, and similar scoping for other Reference
-related macros. See the documentation for more information.Eq
for Datum
.Mul<Time>
and Div<Time>
implementations for Quantity
.Unit
s to the dimensions::constants
module, all of the items of which are reexported both to the dimensions
module and at the crate's top level.