Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several fixes to make it work as a drop in replacement for roscore #5

Merged
merged 6 commits into from
Jul 20, 2024
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@ keywords = ["ros", "rosrust", "roscore", "robotics"]
categories = ["science::robotics"]

[dependencies]
dxr = { version = "0.5.3", features = ["server", "server-axum"] }
dxr = { version = "0.6.3" }
dxr_server = { version = "0.6.3", features = ["axum", "multicall"] }
dxr_client = { version = "0.6.3", default-features = false, features = [
"reqwest",
"rustls-tls" # Use rustls instead of openssl for easier cross-compilation
] }
anyhow = "1.0.69"
log = "0.4.17"
env_logger = "0.10.0"
chrono = "0.4.24"
paste = "1.0.12"
tokio = { version = "1", features = ["macros", "rt-multi-thread"]}
url = "2.3.1"
maplit = "1.0.2"
futures = "0.3.30"
uuid = { version = "1.10.0", features = ["v1", "rng"] }

[dev-dependencies]
rosrust = "0.9"
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ necessary to use this script to use the standalone implementation on its own.
We welcome contributions to this project! If you find a bug or have a feature
request, please create an issue on the GitHub repository. If you want to
contribute code, feel free to submit a pull request.


## Cross-compilation to arm64
```bash
apt install libssl-dev:arm64
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu/
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu/
cargo build --target aarch64-unknown-linux-gnu --release
```
8 changes: 4 additions & 4 deletions src/client_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dxr::client::{Call, Client, ClientBuilder, Url};
use dxr::Value;
use dxr_client::{Call, Client, ClientBuilder, Url};

pub struct ClientApi {
client: Client,
Expand Down Expand Up @@ -42,8 +42,8 @@ impl ClientApi {
publisher_apis: &Vec<String>,
) -> anyhow::Result<()> {
let request = Call::new("publisherUpdate", (caller_id, topic, publisher_apis));
let result = self.client.call(request).await;
result
let result = self.client.call::<_, ()>(request).await;
Ok(result?)
}

/// Sends a "paramUpdate" request to the ROS node.
Expand All @@ -65,6 +65,6 @@ impl ClientApi {
) -> anyhow::Result<()> {
let request = Call::new("paramUpdate", (caller_id, key, value));
let result = self.client.call(request).await;
result
Ok(result?)
}
}
Loading
Loading