Conversation
There was a problem hiding this comment.
remove "K1" from the start of the skill names
There was a problem hiding this comment.
don't thing this should be here
There was a problem hiding this comment.
don't think this should be here
There was a problem hiding this comment.
can probably remove tinyrobotics as a dep now I think
|
Should try get CI working |
| strategy: | ||
| matrix: | ||
| platform: ["generic", "nuc12wshi7"] | ||
| platform: ["generic_k1", "orinnx"] |
There was a problem hiding this comment.
| platform: ["generic_k1", "orinnx"] | |
| platform: ["generic", "orinnx"] |
this could still be called generic, right?
There was a problem hiding this comment.
yes it can; I changed it so that if I ever got Actions running on the K1 repo it wouldn't interfere with the NUgus generic image, but it can be changed back for the merge in
| build-args: | | ||
| platform=generic |
| build-args: | | ||
| platform=${{ matrix.platform == 'generic_k1' && 'generic' || matrix.platform }} |
There was a problem hiding this comment.
new toolchain uses the platform argument to determine whether to setup stuff for cross-compilation (ARM sysroot, apt repository mirrorlist, etc.), hence the build arg
| build-args: | | ||
| platform=generic |
| include(ToolchainLibraryFinder) | ||
| ToolchainLibraryFinder( | ||
| NAME zlib | ||
| NAME ZLIB |
There was a problem hiding this comment.
zlib wouldn't work if it wasn't all caps for some reason; will need to double check
| // Must match the writer-side layout in NUbridge exactly (binary compatibility). | ||
| struct SharedImageHeader { |
There was a problem hiding this comment.
Pull all of this out into a folder similar to what is done for the sensor filter - try to just have the Reactor constructor in here.
There was a problem hiding this comment.
K1Camera got a refactor in the beijing-masters-2026 branch to no longer need a shared memory ROS2 bridge; will need to get that in ASAP since it changes a lot of the code you commented on
| }); | ||
|
|
||
| on<Trigger<Sensors>>().then("Buffer Hcw", [this](const Sensors& sensors) { | ||
| std::lock_guard<std::mutex> lock(sensors_mutex); |
There was a problem hiding this comment.
Is this trying to stop this reaction running more than once at a time? Use Single instead, or look at Sync.
| std::lock_guard<std::mutex> lock(sensors_mutex); | ||
| auto now = NUClear::clock::now(); | ||
| Hcws.resize(std::distance(Hcws.begin(), std::remove_if(Hcws.begin(), Hcws.end(), [now](const auto& v) { | ||
| return v.first < (now - std::chrono::milliseconds(500)); |
| std::mutex cameras_mutex; | ||
| std::mutex sensors_mutex; | ||
| std::vector<std::unique_ptr<CameraContext>> cameras; | ||
| std::vector<std::pair<NUClear::clock::time_point, Eigen::Isometry3d>> Hcws; | ||
|
|
||
| void camera_thread(CameraContext& ctx); | ||
| void stop_cameras(); |
| head_pose: | ||
| - segment: _head_pose | ||
|
|
||
| # Deadband (metres for x/y, radians for theta) below which normalized odometry components are |
There was a problem hiding this comment.
| # Deadband (metres for x/y, radians for theta) below which normalized odometry components are | |
| # Deadband (metres for x/y, radians for theta) below which normalised odometry components are |
We all knew this day was coming! This PR is the culmination of months of work and phases out the NUgus for the K1.
There are a lot of changes:
/dockerto see the shennanigans I had to get into.formation.yamlfile made from the formation rules used by the other teams. There were changes here that I'm not fully across, so let me know if I missed anything here.There were a lot of changes done, and I don't fully recall all of them, so I'll add them in as I remember.
Reviewers, Note
I will need to do a full pass of NUbook documentation and make a PR for that as well (including archiving NUgus and Darwin documentation). There's also a fair bit of work left on the K1 repo in terms of outstanding PRs and changes (need to bring in changes from Beijing into main, and also look into things such as switching to ONNXRuntime instead of maintaining a bespoke TensorRT implementation).
There's also ongoing work with the NUgus (@vincenttumminello is working on RL with the NUgus as part of his FYP), as well as other outstanding PRs on this end of the codebase.
Once both ends have merged/closed their relevant PRs, we can tag the most recent NUgus commit and begin the merge.
Things left to do