Add CAN and IMU emulation scripts - #27
Draft
EricPedley wants to merge 14 commits into
Draft
EricPedley wants to merge 14 commits into
EricPedley wants to merge 14 commits into
Conversation
motor now should be emulating multi acutator buses Add PTY-based IMU emulator scripts (socat + python) Rename PTY links to imu_emulator_in / imu_emulator_out for clarity socat: create PTYs with mode=0666 so firmware can open without sudo add printing to see if progress change imu path with env var add a bunch of bullshit to read IMU emulator correctly fix actuator id parse(?) Fix another thingy fix stupid fucking hardcoded info log level add going to positions fix bus timeout issue get past homing stage and add a shit ton more debug crap that I probably don't need anymore add script that does setup and teardown add rerun logging to motor emulator
|
|
it keeps automatically trying to do this
Added example aliases for running various scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes it easier to test firmware changes without actually using the real hardware. So far, we've had quite a few scary moments testing firmware changes on the robot due to:
The scary thing that happens is the joints getting setpoints that are far away from their current position, or in impossible-to-reach configurations, and it slams against itself or the hard-stops or the the table really violently.
This PR adds some files that will emulate the actuator CAN buses and IMU connection so the firmware can be ran without any hardware.
export CAN_INTERFACES=can0,can1before running the firmwareexport IMU_DEV=/tmp/imu_emulator_inbefore running the firmware for it to connect to the emulatoralso, this changes how logging works, so you explicitly have to set
export RUST_LOG=infootherwise no logs will be printed. But nowRUST_LOG=debugworks, whereas it was broken before.Will update this branch+PR description more before asking for review