khepera4-sys 0.1.0

APIs for controlling a Khepera IV robot.
Documentation
  • Coverage
  • 70%
    7 out of 10 items documented0 out of 6 items with examples
  • Size
  • Source code size: 141.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.49 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • alicorn/pub/khepera4-sys
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • caer

Low-level hardware abstraction layer for controlling a Khepera IV robot.

Special Thanks to the Novel Engineering of Swarm Technology (NEST) lab at Worcester Polytechnic Institute for providing a reference usage of the Khepera IV APIs, and providing us with access to their Khepera IV swarms for testing this crate.

Using this Crate

The documentation for this crate can be generated by running cargo doc; the generated docs will be written to release/.

...on any system

Although the actual Khepera libraries can only be used on an actual Khepera, this crate exposes a single HasKhepera4Hardware trait which can be compiled on any host.

This trait can be used to create mock implementations of the Khepera IV system, which systems can use for integration testing or simulation when an actual Khepera is unavailable.

...on a real Khepera IV

In addition to adding a dependency on this crate, you will need to add (or update) a .cargo/config.toml at the root of your crate containing:

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-poky-linux-gnueabi-gcc"
rustflags = [
    "-C", "link-arg=-march=armv7-a",
    "-C", "link-arg=-mfloat-abi=hard",
    "-C", "link-arg=-mfpu=neon",
    "-C", "link-arg=-mtune=cortex-a8",
    "-C", "link-arg=--sysroot=/opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi",
]

Once this configuration is added, follow the instructions below on how to cross-compile this crate (or a crate dependning on it).

Cross-Compiling from a Linux Host

Before building this crate, or a Crate depending on this crate, you need to:

  1. Install Rust.
  2. Install Clang.
  3. Install the ARMv7 Rust toolchain: rustup target add armv7-unknown-linux-gnueabihf
  4. Install the Khepera IV SDK "light tools".

Once these tools are installed, you can build this crate by running:

  1. source /opt/poky/1.8/environment-setup-cortexa8hf-vfp-neon-poky-linux-gnueabi (assuming your Khepera IV SDK light tools were installed to the default /opt/poky/1.8 path).
  2. cargo build --release --target=armv7-unknown-linux-gnueabihf

When the build completes, the release artifacts will be stored in target/armv7-unknown-linux-gnueabihf.

License and Contributions

Copyright 2023 Alicorn Systems, Inc.

Licensed under the GNU Affero General Public License version 3, as published by the Free Software Foundation. Refer to the license file for more information.

The files within vendor/ retain their original copyrights and licenses, and are included in this repository to simplify the build process for downstream users.