Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 41 additions & 138 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 1 addition & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,11 @@ async-trait = "0.1.89"
clap = { version = "4.6.1", features = ["derive"] }
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "time", "signal", "sync", "fs"] }
tracing = "0.1.44"
phoxal-infra-bus = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-api-component = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-engine = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-component = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-infra-helpers = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal = { version = "0.4.0" }

[workspace.lints.rust]
unused = "warn"

[profile.release]
lto = false
codegen-units = 16

# Patch the engine alias so a transitive git fetch lines up with the framework canonical source.
[patch."https://github.com/phoxal/engine"]
phoxal-infra-bus = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-api-component = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-engine = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-component = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-infra-helpers = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-robot = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-spatial = { git = "https://github.com/phoxal/framework", branch = "main" }
phoxal-core-structure = { git = "https://github.com/phoxal/framework", branch = "main" }
6 changes: 1 addition & 5 deletions bno085/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ async-trait = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "signal", "sync", "time"] }
tracing = { workspace = true }
phoxal-core-engine = { workspace = true }
phoxal-infra-helpers = { workspace = true }
phoxal-core-component = { workspace = true }
phoxal-infra-bus = { workspace = true }
phoxal-api-component = { workspace = true }
phoxal = { workspace = true }
4 changes: 2 additions & 2 deletions bno085/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ mod runtime;

use anyhow::Result;
use clap::Parser;
use phoxal_core_engine::{DriverRuntimeArgs, step::RuntimeProcess};
use phoxal_infra_helpers::init_tracing;
use phoxal::runtime::{DriverRuntimeArgs, RuntimeProcess};
use phoxal::util::init_tracing;
use tracing::info;

use crate::runtime::Config;
Expand Down
29 changes: 14 additions & 15 deletions bno085/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use std::time::Duration;

use anyhow::{Result, bail};
use phoxal_api_component::v1::capability::accelerometer::Sample as AccelerometerSample;
use phoxal_api_component::v1::capability::gyroscope::Sample as GyroscopeSample;
use phoxal_api_component::v1::capability::imu;
use phoxal_api_component::v1::capability::imu::Sample as ImuSample;
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::Capability;
use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step};
use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs};
use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs};
use phoxal_infra_bus::pubsub::Stamped;
use phoxal::api::component::v1::capability::accelerometer::Sample as AccelerometerSample;
use phoxal::api::component::v1::capability::gyroscope::Sample as GyroscopeSample;
use phoxal::api::component::v1::capability::imu;
use phoxal::api::component::v1::capability::imu::Sample as ImuSample;
use phoxal::bus::pubsub::Stamped;
use phoxal::model::component::v1::CapabilityRef;
use phoxal::model::component::v1::capability::Capability;
use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step};
use phoxal::runtime::{EmptyArgs, Io, Publisher, RobotRuntimeArgs, Runtime, RuntimeInputs};

#[derive(Clone)]
pub struct Config {
Expand All @@ -22,7 +21,7 @@ pub struct Config {
impl Config {
pub fn new(
component_id: &str,
component: &phoxal_core_component::v1::Component,
component: &phoxal::model::component::v1::Component,
) -> Result<Self> {
Ok(Self {
imu: sensor(component_id, component, CapabilityKind::Imu)?,
Expand Down Expand Up @@ -50,7 +49,7 @@ enum CapabilityKind {

fn sensor(
component_id: &str,
component: &phoxal_core_component::v1::Component,
component: &phoxal::model::component::v1::Component,
kind: CapabilityKind,
) -> Result<SampledSensor> {
let mut sensor = None;
Expand Down Expand Up @@ -161,22 +160,22 @@ impl Runtime for Bno085Runtime {

async fn new(io: &mut Io<Self::Input>, config: Self::Config) -> Result<Self> {
let imu_pub = io
.publisher::<Stamped<ImuSample>>(&imu::topic(
.publisher::<Stamped<ImuSample>>(&imu::path(
&config.imu.capability.component_id,
&config.imu.capability.capability_id,
))
.await?;
let accelerometer_pub = io
.publisher::<Stamped<AccelerometerSample>>(
&phoxal_api_component::v1::capability::default_profile_path(
&phoxal::api::component::v1::capability::default_profile_path(
&config.accelerometer.capability.component_id,
&config.accelerometer.capability.capability_id,
),
)
.await?;
let gyroscope_pub = io
.publisher::<Stamped<GyroscopeSample>>(
&phoxal_api_component::v1::capability::default_profile_path(
&phoxal::api::component::v1::capability::default_profile_path(
&config.gyroscope.capability.component_id,
&config.gyroscope.capability.capability_id,
),
Expand Down
6 changes: 1 addition & 5 deletions ddsm115/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ async-trait = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "signal", "sync", "time"] }
tracing = { workspace = true }
phoxal-core-engine = { workspace = true }
phoxal-infra-helpers = { workspace = true }
phoxal-core-component = { workspace = true }
phoxal-infra-bus = { workspace = true }
phoxal-api-component = { workspace = true }
phoxal = { workspace = true }
Loading
Loading