cu-rp-balancebot

Crates.iocu-rp-balancebot
lib.rscu-rp-balancebot
version
sourcesrc
created_at2024-10-12 20:09:21.756372
updated_at2025-01-21 16:46:50.176299
descriptionThis is a full robot example for the Copper project. It runs on the Raspberry Pi with the balance bot hat to balance a rod.
homepagehttps://github.com/copper-project
repositoryhttps://github.com/copper-project/copper-rs
max_upload_size
id1406847
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | 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`
size0
Guillaume Binet (gbin)

documentation

README

BalanceBot: this is a full Copper demo robot

with:

  • a physical robot implementation
  • a simulation implementation
  • a resimulation demoing the deterministic replay
  • a log export

To run the simulation

$ cd examples/cu_rp_balancebot
$ cargo run --release 

See the UI help for the navigation.

To run the resimulation

(you need at least a log in logs for example from a simulation run).

$ cd examples/cu_rp_balancebot
$ cargo run --bin balancebot_resim --release

It will recreate the logs from only the inputs of the previous run in logs/balancebot_resim*.copper.

To run on the real robot

You will need to cross compile for Arm:

cargo build --target armv7-unknown-linux-musleabihf --release --no-default-features

Be sure you save your log string index:

cp -rv ../../target/armv7-unknown-linux-musleabihf/release/cu29_log_index .  # or anywhere you want

Deploy on the target:

scp ../../target/armv7-unknown-linux-musleabihf/release/balancebot copperconfig.ron copper7:copper/  # change to match your target

To export logs

$ cd examples/cu_rp_balancebot
$ cargo run --bin balancebot-logreader --release
Commit count: 555

cargo fmt