Skip to content
Discussion options

You must be logged in to vote

Hi @jBernavaPrah

It is pretty easy, we have a very user friendly API to hook up Copper to simulations:
Check out the balancebot sim.rs example and you can see this:

The process:

  1. out of your vanilla copperconfig.ron, Copper will build for you a Rust enum matching every single internal step of the execution of the runtime for all your tasks (start, stop, process etc...)

See below for the full source but for example:

default::SimStep::Balpos(CuTaskCallbackState::Process(_, output))

Means that Copper is querying the simulation for the "balpos" source (ie. an encoder) to know what to do when the "process" step is called and gives you "output" as the message to construct out of the simulation…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by makeecat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants