Clearer env var name, version bumps, and updated readme

This commit is contained in:
Martin Dahl 2021-05-06 22:16:20 +02:00
parent 9457f44871
commit f46e119b2e
7 changed files with 18 additions and 17 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "r2r"
version = "0.0.5"
version = "0.0.6"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
description = "Minimal ros2 bindings."
license = "Apache-2.0/MIT"
@ -13,15 +13,15 @@ serde_json = "1.0.62"
failure = "0.1.8"
failure_derive = "0.1.8"
lazy_static = "1.4.0"
common = { path = "common", version = "0.0.2" }
rcl = { path = "rcl", version = "0.0.2" }
msg_gen = { path = "msg_gen", version = "0.0.2" }
common = { path = "common", version = "0.0.3" }
rcl = { path = "rcl", version = "0.0.3" }
msg_gen = { path = "msg_gen", version = "0.0.3" }
[dev-dependencies]
serde_json = "1.0.62"
[build-dependencies]
common = { path = "common", version = "0.0.2" }
msg_gen = { path = "msg_gen", version = "0.0.2" }
common = { path = "common", version = "0.0.3" }
msg_gen = { path = "msg_gen", version = "0.0.3" }
[workspace]

View File

@ -3,6 +3,8 @@ R2R - Minimal ROS2 Rust bindings
Minimal bindings for ROS2 that do *not* require hooking in to the ROS2 build infrastructure. If you want a more ROS-oriented approach, see <https://github.com/ros2-rust/ros2_rust>. In these bindings, convenience Rust types are created by calling into the c introspection libraries to circumvent the .msg/.idl pipeline. The convenience types can be ignored when you need to trade convenience for performance, e.g. treating large chunks of data manually.
When integration with other ROS2 software is desired, instead of the default mode of r2r, which is to build bindings to RCL and messages depending on what is currently sourced, a CMakeLists.txt file can be used to limit the binding to only include specific dependencies. This is done through additional environment variables. See the minimal example at <https://github.com/m-dahl/r2r_minimal_node/>.
Manual is available on github pages <https://sequenceplanner.github.io/r2r/>
How to use

View File

@ -10,7 +10,7 @@ fn main() {
let msg_list = if let Some(cmake_includes) = env::var("CMAKE_INCLUDE_DIRS").ok() {
let packages = cmake_includes.split(":").flat_map(|i| Path::new(i).parent()).collect::<Vec<_>>();
let deps = env::var("CMAKE_RECURSIVE_DEPENDENCIES").unwrap_or(String::default());
let deps = env::var("CMAKE_IDL_PACKAGES").unwrap_or(String::default());
let deps = deps.split(":").collect::<Vec<_>>();
let msgs = common::get_ros_msgs(&packages);
common::parse_msgs(&msgs).into_iter()

View File

@ -1,9 +1,8 @@
[package]
name = "common"
version = "0.0.2"
version = "0.0.3"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
description = "Minimal ros2 bindings."
license = "Apache-2.0/MIT"
edition = "2018"

View File

@ -1,16 +1,16 @@
[package]
name = "msg_gen"
version = "0.0.2"
version = "0.0.3"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
edition = "2018"
[dependencies]
lazy_static = "1.4.0"
rcl = { path = "../rcl", version = "0.0.2" }
common = { path = "../common", version = "0.0.2" }
rcl = { path = "../rcl", version = "0.0.3" }
common = { path = "../common", version = "0.0.3" }
[build-dependencies]
bindgen = "0.57.0"
rcl = { path = "../rcl", version = "0.0.2" }
common = { path = "../common", version = "0.0.2" }
rcl = { path = "../rcl", version = "0.0.3" }
common = { path = "../common", version = "0.0.3" }
heck = "0.3.2"

View File

@ -16,7 +16,7 @@ fn main() {
builder = builder.clang_arg(format!("-I{}", p));
println!("adding include path: {}", p);
}
let deps = env::var("CMAKE_RECURSIVE_DEPENDENCIES").unwrap_or(String::default());
let deps = env::var("CMAKE_IDL_PACKAGES").unwrap_or(String::default());
let deps = deps.split(":").collect::<Vec<_>>();
let msgs = common::get_ros_msgs(&packages);
common::parse_msgs(&msgs).into_iter()

View File

@ -1,6 +1,6 @@
[package]
name = "rcl"
version = "0.0.2"
version = "0.0.3"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
edition = "2018"
@ -11,4 +11,4 @@ widestring = "0.4.3"
[build-dependencies]
bindgen = "0.57.0"
itertools = "0.10.0"
common = { path = "../common", version = "0.0.2" }
common = { path = "../common", version = "0.0.3" }