Giter Site home page Giter Site logo

r2r's Introduction

Sequence Planner

In many modern automation solutions, traditional off-line and manual programming is being replaced by online algorithms that dynamically perform tasks based on the state of the environment. Complexities of such systems are pushed even further with collaboration among robots and humans, where intelligent machines and learning algorithms are replacing more traditional automation solutions.

Sequence Planner (SP) is a control system written in rust for automation control based on ROS2 that tries to handle the increased complexity of these new systems using formal models and online planning algorithms to coordinate the actions of robots and other devices.

The code here does not yet run. Use https://github.com/sequenceplanner/sp-rust

Acknowledgment

The development of SP as a control system has been developed in various research projects:

  • Virtcom 2, FFI project funded by Vinnova, Sweden’s innovation agency
  • Unficiation, Production 2030 project funded by Vinnova, Sweden’s innovation agency
  • Unicorn, FFI project funded by Vinnova, Sweden’s innovation agency

rosin_logo

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components. More information: rosin-project.eu

eu_flag

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 732287.

r2r's People

Contributors

achary avatar alecrivers avatar gabrieldertoni avatar jerry73204 avatar jiangeng-nimble avatar kristoferb avatar lopsided98 avatar m-dahl avatar marcomaida94 avatar mchhoy avatar midnightexigent avatar nerdtomars avatar passchaos avatar rdelfin avatar skoudmar avatar szandara avatar tfoldi avatar tijljappens avatar wentasah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r2r's Issues

Don't you use cargo fmt?

It seems that the source of r2r is not formated by rustfmt.
I think it's very popular to use cargo fmt to format the files.

How to public the bytes message with r2r?

Hi guys,

I want to pub/sub some bytes data with r2r, but what type I can use? I only found the std_msgs/ByteMultiArray.
I can use it to send my data, right? I can not find any example about it.

Thanks.

Build Fails ( ROS not sourced?)

I am building a DockerFile for a project that depends on r2r.

I am using ros2 and have made sure to source my ros2 installation before building my application.

I keep having the following error during cargo build:

error: failed to run custom build command for `r2r_rcl v0.3.4`

Caused by:
  process didn't exit successfully: `/gdp-router/target/debug/build/r2r_rcl-70fc35e866c7fffb/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AMENT_PREFIX_PATH
  cargo:rerun-if-env-changed=CMAKE_INCLUDE_DIRS
  cargo:rerun-if-env-changed=CMAKE_LIBRARIES
  cargo:rerun-if-env-changed=CMAKE_IDL_PACKAGES
  cargo:rerun-if-env-changed=IDL_PACKAGE_FILTER

  --- stderr
  Generate bindings file '.../target/debug/build/r2r_rcl-33a8866d536db875/out/fe5011cc8ab0e2af6e01c3a254e65b60897d7140b7771f907c1a5a99bb6a987a/rcl_bindings.rs'
  thread 'main' panicked at 'Source your ROS!: NotPresent', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/r2r_common-0.3.4/src/lib.rs:60:64
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

I have tried both rolling and humble and keep having this error.

Is there something I am missing or should be doing?

Thank you

Serialize and deserialize messages with rcl serializer

Thanks for the great library.

I am currently developing an application that gets ROS2 messages and sends the serialized messages over the network. I noticed r2r uses serde serialization which may generate large and inefficient message for types like sensor_msgs/Image. I am wondering if there were any interfaces for rcl's serializer, something like

static rclcpp::Serialization<serialization::msg::Mytypes> serializer;
serializer.serialize_message(&message, &serialized_msg);

Building in docker on M1

When I build minimal example in docker on my Mac mini M1 I get:

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/r2r-c48e5652e9219d1b/e4dcb4d/rcl/src/lib.rs:126:62
    |
126 |                     unsafe { std::ptr::copy(values.as_ptr(), self.data, values.len()); }
    |                                                              ^^^^^^^^^ expected `f64`, found `u128`
...
144 | primitive_sequence!(rosidl_runtime_c__long_double, f64);
    | -------------------------------------------------------- in this macro invocation
    |
    = note: expected raw pointer `*mut f64`
               found raw pointer `*mut u128`
    = note: this error originates in the macro `primitive_sequence` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/r2r-c48e5652e9219d1b/e4dcb4d/rcl/src/lib.rs:133:21
    |
129 |                 pub fn to_vec(&self) -> Vec<$element_type> {
    |                                         ------------------ expected `Vec<f64>` because of return type
...
133 |                     target
    |                     ^^^^^^ expected `f64`, found `u128`
...
144 | primitive_sequence!(rosidl_runtime_c__long_double, f64);
    | -------------------------------------------------------- in this macro invocation
    |
    = note: expected struct `Vec<f64>`
               found struct `Vec<u128>`
    = note: this error originates in the macro `primitive_sequence` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rcl`

To replicate on M1 Mac:

docker run -it --rm kristoferb/spbase_ros2:galactic
root@f7ca0c8e3b3d:/# git clone https://github.com/m-dahl/r2r_minimal_node.git
root@f7ca0c8e3b3d:/# cd r2r_minimal_node/
root@f7ca0c8e3b3d:/r2r_minimal_node# colcon build

unsafe precondition(s) violated: ptr::copy_nonoverlapping with rust 1.78

With rust 1.78 we now get panics on what I assume has to do with how we copy data from c message structs.

thread 'msg_types::tests::test_float_sequence' panicked at library/core/src/panicking.rs:156:5:
unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap

As a temporary fix you can downgrate to rust 1.77.

But we should investigate the root cause of the problem.

Compile only necessary packages to speed up compilation

Currently, r2r compiles all discovered message types, which leads to a lengthy compilation time.
The idea is to let r2r acknowledge required ROS packages in package.xml (or Cargo.toml), and compile necessary packages.
The tricky part is to allow r2r to learn requested packages from dependent crates. It is usually done by feature flags or environment variables. A relevant discussion can be found here rust-lang/cargo#4121.

WrappedTypesupport private

I got stuck today trying to write a generic node subscribe function because the WrappedTypesupport trait is private. All the ROS types I was using implemented this trait because they were auto-generated messages type. So this feels like something I should be able to do, but was blocked unnecessarily

Support for constants in ROS messages

First of all, thanks for making this binding crate! It makes it super easy for communicating with existing C++/Python nodes.

What I want to ask is whether we plan to support constants in ROS messages shortly. Currently, I cannot find the support and need to manually duplicate the ROS message constants in Rust.

One of the examples is action_msgs::msg::GoalStatus, where constants STATUS_UNKNOWN, STATUS_ACCEPTED, etc. are defined. However, the generated action_msgs.rs looks like this:

pub mod msg {
    // ... some other structs

    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    #[serde(default)]
    pub struct GoalStatus {
        pub goal_info: action_msgs::msg::GoalInfo,
        pub status: i8,
    }

    impl WrappedTypesupport for GoalStatus {
        type CStruct = action_msgs__msg__GoalStatus;

        fn get_ts() -> &'static rosidl_message_type_support_t {
            unsafe { &*rosidl_typesupport_c__get_message_type_support_handle__action_msgs__msg__GoalStatus() }
        }

        fn create_msg() -> *mut action_msgs__msg__GoalStatus {
            unsafe { action_msgs__msg__GoalStatus__create() }
        }

        fn destroy_msg(msg: *mut action_msgs__msg__GoalStatus) -> () {
            unsafe { action_msgs__msg__GoalStatus__destroy(msg) };
        }

        fn from_native(msg: &Self::CStruct) -> GoalStatus {
            GoalStatus {
                goal_info: action_msgs::msg::GoalInfo::from_native(&msg.goal_info),
                status: msg.status,
            }
        }

        fn copy_to_native(&self, msg: &mut Self::CStruct) {
            self.goal_info.copy_to_native(&mut msg.goal_info);
            msg.status = self.status;
        }
    }

    impl Default for GoalStatus {
        fn default() -> Self {
            let msg_native = WrappedNativeMsg::<GoalStatus>::new();
            GoalStatus::from_native(&msg_native)
        }
    }

    // ...some other structs
}

What I tried before raising this issue:

  1. Read the documentation to see if this is mentioned elsewhere
  2. Checked the features of the crates to see if there is a feature to open
  3. Went over the files under OUT_DIR to see if it is generated in another file

Please forgive me if the constants are generated somewhere else or if this is a known issue. And thanks again for making this crate!

Bug: Incorrect error parsing

I've found out someRCL_RET_ACTION_* error codes collide with RCL_RET_EVENT_* return codes which makes current from_rcl_error incorrect (Some enum variant are never created).

An option would be to split error parsing, but as actions actually use many of error codes defined in "base" rcl it seems kinda hacky for me.

As I don't have any clean way to handle I'm just leaving it here so maybe someone else can come up with a clean solution for it.

Failed docs.rs build

The latest published version of r2r has a failed docs.rs build. I suspect this failiure will be present in future versions too unless the bug was fixed. Is it worth having a CI check in this repo to confirm this?

Improvement for static array support

I came into a problem with static array support when using r2r.

As is described in the ROS 2 interfaces, ROS message supports static arrays where the array size is known at compile time.

For example, if I have a message ValueGroup.msg,

# file: example/msg/ValueGroup.msg
uint8[5] values

The corresponding C struct is

typedef struct example__msg__ValueGroup
{
  uint8_t values[6];
} example__msg__ValueGroup;

However, the generated Rust binding uses Vec.

pub struct ValueGroup {
    values: Vec<u8>
}

And the publisher panics if it receives a ValueGroup with an incorrect size.

I saw a comment from 4 years ago. https://github.com/sequenceplanner/r2r/blob/master/r2r_msg_gen/src/lib.rs#L392

// actually lets use a vector anyway because its more convenient with traits. assert on the fixed size instead!

However, since "const generic" has been stable for a long time (since Rust 1.51), is it possible to bring the static array back?

Again thanks for writing and maintaining this awesome crate! Forgive me if I raise issues too frequently.

Occasional build failures

Description

Hi,
Really appreciate the project!

When I try to build the master branch (commit: cb87b9c), I get sporadic build failures such as these:

root@6a46f60839d9:/workspace/src/r2r# cargo build
    Updating crates.io index
   Compiling unicode-ident v1.0.12
....
   Compiling r2r_macros v0.8.2 (/workspace/src/r2r/r2r_macros)
error: failed to build archive: No such file or directory

error: could not compile `r2r_rcl` (lib) due to previous error

In the r2r_msg_gen folder:

root@6a46f60839d9:/workspace/src/r2r/r2r_msg_gen# cargo build
   Compiling proc-macro2 v1.0.76
   ...
   Compiling r2r_common v0.8.2 (/workspace/src/r2r/r2r_common)
   Compiling syn v2.0.48
   Compiling rand_core v0.6.4
   Compiling rand v0.8.5
   Compiling phf_shared v0.11.2
   Compiling widestring v1.0.2
   Compiling phf_generator v0.11.2
   Compiling rayon v1.8.0
   Compiling itertools v0.10.5
   Compiling force-send-sync v1.1.0
   Compiling phf_macros v0.11.2
   Compiling r2r_rcl v0.8.2 (/workspace/src/r2r/r2r_rcl)
   Compiling phf v0.11.2
error: failed to build archive: No such file or directory

error: could not compile `r2r_rcl` (lib) due to previous error

Also in the r2r_msg_gen folder, but a different issue:

root@6a46f60839d9:/workspace/src/r2r/r2r_msg_gen# cargo build
   Compiling proc-macro2 v1.0.76
  ...
   Compiling r2r_rcl v0.8.2 (/workspace/src/r2r/r2r_rcl)
   Compiling phf v0.11.2
   Compiling r2r_msg_gen v0.8.2 (/workspace/src/r2r/r2r_msg_gen)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/local/rustup/toolchains/1.74.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/opt/ros/humble/bin:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "/tmp/rustcceJls8/symbols.o" "/workspace/src/r2r/target/debug/build/r2r_msg_gen-e9ad2381dcda375b/build_script_build-e9ad2381dcda375b.12zdci3pgc82bt7m.rcgu.o" "/workspace/src/r2r/target/debug/build/r2r_msg_gen-e9ad2381dcda375b/build_script_build-e9ad2381dcda375b.13spihe4tc5d5ny1.rcgu.o" 
...
          /usr/bin/ld: cannot find /workspace/src/r2r/target/debug/build/r2r_msg_gen-e9ad2381dcda375b/build_script_build-e9ad2381dcda375b.x32cgeyuqc1jgto.rcgu.o: No such file or directory
          collect2: error: ld returned 1 exit status


error: could not compile `r2r_msg_gen` (build script) due to previous error

I trimmed down these errors a bit for readability, but I can provide the full errors if needed in the comment.

Sometimes I can get a successful build, but even this is with some warnings here:

root@6a46f60839d9:/workspace/src/r2r/r2r_msg_gen# cargo build
   Compiling typenum v1.17.0
   Compiling generic-array v0.14.7
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling digest v0.10.7
   Compiling sha2 v0.10.8
   Compiling r2r_common v0.8.2 (/workspace/src/r2r/r2r_common)
   Compiling r2r_rcl v0.8.2 (/workspace/src/r2r/r2r_rcl)
   Compiling r2r_msg_gen v0.8.2 (/workspace/src/r2r/r2r_msg_gen)
error: failed to build archive: No such file or directory

error: could not compile `r2r_msg_gen` (lib) due to previous error


root@6a46f60839d9:/workspace/src/r2r/r2r_msg_gen# cargo build
   Compiling r2r_rcl v0.8.2 (/workspace/src/r2r/r2r_rcl)
   Compiling r2r_msg_gen v0.8.2 (/workspace/src/r2r/r2r_msg_gen)
warning: error copying object file `/workspace/src/r2r/target/debug/deps/r2r_msg_gen-00c58d0eab42599d.2620itydnjy74yt0.rcgu.o` to incremental directory as `/workspace/src/r2r/target/debug/incremental/r2r_msg_gen-175e4ubb88a6j/s-gsda2c1zr4-1ejczho-working/2620itydnjy74yt0.o`: No such file or directory (os error 2)

warning: `r2r_msg_gen` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 9.73s

I am using the master branch because I am relying on the resolution of #77.

To Reproduce

Clone master branch and run a build.

Expected behavior

Successful build.

Screenshots/Video

If applicable, add screenshots/video to help explain your problem.
Remember to mark the area in the application thats impacted.

Build environment

  • Docker for Mac
  • devcontainer with ghcr.io/devcontainers/features/rust:1 feature.

Additional context

I am building in a Docker container and it seems like I have less issues when I allocate fewer CPUs to my Docker

Improve generated types for constants in ros messages.

As discussed in #45, constants are currently generated like this:

#[allow(non_upper_case_globals)]
impl MyCustomMsg {
    pub const MY_CONSTANT_ONE: _bindgen_ty_139 = my_custom_package__msg__MyCustomMsg__MY_CONSTANT_ONE;
}

Instead of the actual type defined in the msg/idl file, we get a bindgen generated type. This is because constants are defined like this in the generated c header files:

enum
{
  my_custom_package__msg__MyCustomMsg__MY_CONSTANT_ONE = 1
};

If we knew the constant was a i8, we could generate the code like this instead:

#[allow(non_upper_case_globals)]
impl MyCustomMsg {
    pub const MY_CONSTANT_ONE: i8 = my_custom_package__msg__MyCustomMsg__MY_CONSTANT_ONE as i8;
}

But since we currently do not read the msg files, I am not sure how to get the actual type of the constant. It could be that we need to start reading the msg files, but that would lead to a large rewrite of the msg generation code. Maybe a fun project for the future...

Version 0.8.3 won't build, Error E0446

Steps to reproduce:

  • Make new directory
  • run cargo init
  • Add r2r = "0.8.3" to Cargo.toml
  • run cargo build

Cargo build output below

cargo build
   Compiling r2r v0.8.3
error[E0446]: crate-private type  in public interface
   --> /home/druthyn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r-0.8.3/src/publishers.rs:128:1
    |
44  |   pub(crate) struct Publisher_ {
    |   ----------------------------  declared as crate-private
...
128 | / pub fn make_publisher<T>(handle: Weak<Publisher_>) -> Publisher<T>
129 | | where
130 | |     T: WrappedTypesupport,
    | |__________________________^ can't leak crate-private type

error[E0446]: crate-private type  in public interface
   --> /home/druthyn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r-0.8.3/src/publishers.rs:138:1
    |
44  | pub(crate) struct Publisher_ {
    | ----------------------------  declared as crate-private
...
138 | pub fn make_publisher_untyped(handle: Weak<Publisher_>, type_: String) -> PublisherUntyped {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type

error[E0446]: crate-private type  in public interface
   --> /home/druthyn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r-0.8.3/src/publishers.rs:142:1
    |
44  |   pub(crate) struct Publisher_ {
    |   ----------------------------  declared as crate-private
...
142 | / pub fn create_publisher_helper(
143 | |     node: &mut rcl_node_t, topic: &str, typesupport: *const rosidl_message_type_support_t,
144 | |     qos_profile: QosProfile,
145 | | ) -> Result<Publisher_> {
    | |_______________________^ can't leak crate-private type

For more information about this error, try 'rustc --explain E0446'
error: could not compile  (lib) due to 3 previous errors

Version 0.8.2 builds without issue for me.

BUG: Cannot compile library

Hello,
I'm trying to use your library, i got this error :
Compiling r2r v0.8.3
error[E0446]: crate-private type publishers::Publisher_ in public interface
--> /*/r2r-0.8.3/src/publishers.rs:128:1
|
44 | pub(crate) struct Publisher_ {
| ---------------------------- publishers::Publisher_ declared as crate-private
...
128 | / pub fn make_publisher(handle: Weak<Publisher_>) -> Publisher
129 | | where
130 | | T: WrappedTypesupport,
| |__________________________^ can't leak crate-private type

Any idea why i canno't compile it ?

I'm using this version : r2r = "0.8.3"

action server topic not listed with `ros2 topic list`

I'm writing an action server based off of this [example code(https://github.com/sequenceplanner/r2r/blob/master/r2r/examples/action_server.rs). When I run my action server and then run ros2 topic list, nothing is listed. When I run ros2 topic list --include-hidden-topics, then I get the following output:

/my_topic/_action/feedback
/my_topic/_action/status

I don't see the topic for submitting goals in the first place. Am I doing something wrong?

Also, why are the topics hidden? Is it possible to make them unhidden by default?

Setup CI

Set up CI that continuously builds and runs the tests on rolling and foxy. Add galactic when that is released. Would be enough to run on ubuntu at the moment.

Do you have a plan to implement action?

Thank you for your great work!

In the ROS1 era, we were able to use pub/sub to use ROS1 action, so we didn't need action implement actually.

But action is natively implemented (not composition of the topics) in ROS2.
So, supporting action seems to be very important.
What I want to do is just send the goal to Nav2.

Do you have a plan to support action? I'm thinking of trying to implement it if you don't think it.
(i don't know if I can do it)

Use-after-free when failing to `rcl_return_loaned_message_from_subscription`

The error path when rcl_return_loaned_message_from_subscription fails on native subscriptions suffers from a use-after-free problem:

https://github.com/sequenceplanner/r2r/blob/master/r2r/src/subscribers.rs#L107 drops the handle before the error handling starts. This means that accessing it later (https://github.com/sequenceplanner/r2r/blob/master/r2r/src/subscribers.rs#L113) is incorrect.

I believe the problem can be fixed by moving the drop call after the error handling block, or alternatively leaving out the "drop" and destroying the Box when the function returns.


The issue is a bit tricky to reproduce; I've run across it only when using cyclonedds+iceoryx as a middleware. Use the following pair of senders/receivers:
bug_reproducer.tar.gz

Run them with the CYCLONEDDS_URI environment variable pointed to the provided cyclonedds.xml file (see also https://cyclonedds.io/docs/cyclonedds/latest/config/index.html). The receiver should run into the problem within a few seconds.

An easier way to reproduce might be to temporarily pass a nullptr into rcl_return_loaned_message_from_subscription (instead of the right handle) and trigger the error path that way.

Fails to cross-compile for armv7/aarch64 architectures

Hello,

First, just wanted to say that I've really enjoyed working with this crate so far! Being able to configure ROS nodes without needing to tie into the entire colcon/catkin build structure is really a joy.

I'm interested in deploying a simple monitoring node to an RPi, but have run into an issue with the compiling r2r for architectures besides x86 (my host computer is running an Intel i5-5300U). I've verified that my cross-compilation toolchain is working (per the rust-cross repository) and can compile and run simple armv7 programs on my target Pi.

The follow compiles for my host machine, but produces an error when I run the $ cargo build --target=armv7-unknown-linux-gnueabihf command.

use failure::Error;
use r2r;

use std::time::Duration;

fn main() -> Result<(), Error> {
    let ctx = r2r::Context::create()?;
    let mut node = r2r::Node::create(ctx, "echo", "")?;

    let topic: String = "/rosout".to_string();

     let cb = move |msg: r2r::rcl_interfaces::msg::Log| {
        println!("raw_msg: {:#?}", &msg);
    };

    let _ws2 = node.subscribe(&topic, Box::new(cb))?;

    loop {
        node.spin_once(Duration::from_millis(100));
    }

    Ok(())
}

The above does compile on my host computer using $ cargo build, but does not compile for armv7, producing the following errors:

error[E0063]: missing field `__bindgen_padding_0` in initializer of `rmw_message_info_t`
  --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:13:9
   |
13 |         rmw_message_info_t {
   |         ^^^^^^^^^^^^^^^^^^ missing `__bindgen_padding_0`

error[E0063]: missing fields `__bindgen_padding_0`, `__bindgen_padding_1` in initializer of `rmw_qos_profile_t`
  --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:27:9
   |
27 |         rmw_qos_profile_t {
   |         ^^^^^^^^^^^^^^^^^ missing `__bindgen_padding_0`, `__bindgen_padding_1`

error[E0308]: mismatched types
  --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:46:41
   |
46 |         let s = unsafe { CStr::from_ptr(self.data as *mut i8) };
   |                                         ^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*mut i8`

error[E0308]: mismatched types
  --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:54:62
   |
54 |             rosidl_runtime_c__String__assign(self as *mut _, to_send_ptr);
   |                                                              ^^^^^^^^^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

error[E0308]: mismatched types
   --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:127:62
    |
127 |                     unsafe { std::ptr::copy(values.as_ptr(), self.data, values.len()); }
    |                                                              ^^^^^^^^^ expected `u128`, found `f64`
...
143 | primitive_sequence!(rosidl_runtime_c__long_double, u128);
    | --------------------------------------------------------- in this macro invocation
    |
    = note: expected raw pointer `*mut u128`
               found raw pointer `*mut f64`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> /home/chrism/.cargo/git/checkouts/r2r-c48e5652e9219d1b/9bc75b6/rcl/src/lib.rs:134:21
    |
130 |                 pub fn to_vec(&self) -> Vec<$element_type> {
    |                                         ------------------ expected `Vec<u128>` because of return type
...
134 |                     target
    |                     ^^^^^^ expected `u128`, found `f64`
...
143 | primitive_sequence!(rosidl_runtime_c__long_double, u128);
    | --------------------------------------------------------- in this macro invocation
    |
    = note: expected struct `Vec<u128>`
               found struct `Vec<f64>`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0063, E0308.
For more information about an error, try `rustc --explain E0063`.
The following warnings were emitted during compilation:

warning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
warning: set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

error: could not compile `rcl`

To learn more, run the command again with --verbose.

I get a similar, but not identical error message for the aarch64-unknown-linux-gnu architecture, which only has the u8 vs. i8 errors.

My compiler version is: rustc 1.49.0-nightly (3525087ad 2020-10-08). Any help or suggestions for tracking this problem down would be really appreciated!

Build fails: unresolved import `RCUTILS_LOG_SEVERITY`

Hi there, I've tried to run the standard publish example, but got some issues.

What I did :

# clone the git repo
source /opt/ros/foxy/setup.bash
cd r2r
cargo build

Cargo error:

   Compiling r2r v0.6.6 (/app/r2r/r2r)
error[E0432]: unresolved import `RCUTILS_LOG_SEVERITY`
  --> r2r/src/utils.rs:63:13
   |
63 |         use RCUTILS_LOG_SEVERITY::*;
   |             ^^^^^^^^^^^^^^^^^^^^ use of undeclared type `RCUTILS_LOG_SEVERITY`

error[E0412]: cannot find type `RCUTILS_LOG_SEVERITY` in this scope
  --> r2r/src/utils.rs:62:28
   |
62 |     fn to_native(&self) -> RCUTILS_LOG_SEVERITY {
   |                            ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_UNSET` in this scope
  --> r2r/src/utils.rs:65:35
   |
65 |             LogSeverity::Unset => RCUTILS_LOG_SEVERITY_UNSET,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_DEBUG` in this scope
  --> r2r/src/utils.rs:66:35
   |
66 |             LogSeverity::Debug => RCUTILS_LOG_SEVERITY_DEBUG,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_INFO` in this scope
  --> r2r/src/utils.rs:67:34
   |
67 |             LogSeverity::Info => RCUTILS_LOG_SEVERITY_INFO,
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_WARN` in this scope
  --> r2r/src/utils.rs:68:34
   |
68 |             LogSeverity::Warn => RCUTILS_LOG_SEVERITY_WARN,
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_ERROR` in this scope
  --> r2r/src/utils.rs:69:35
   |
69 |             LogSeverity::Error => RCUTILS_LOG_SEVERITY_ERROR,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `RCUTILS_LOG_SEVERITY_FATAL` in this scope
  --> r2r/src/utils.rs:70:35
   |
70 |             LogSeverity::Fatal => RCUTILS_LOG_SEVERITY_FATAL,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

What I've tried:

I noticed it this might be something related to r2r_rcl/build.rs to generate rcl_binding.rs, here are r2r_rcl build outputs:

Output:

cargo:rerun-if-env-changed=AMENT_PREFIX_PATH
cargo:rerun-if-env-changed=CMAKE_INCLUDE_DIRS
cargo:rerun-if-env-changed=CMAKE_LIBRARIES
cargo:rerun-if-env-changed=CMAKE_IDL_PACKAGES
cargo:rerun-if-env-changed=IDL_PACKAGE_FILTER
cargo:rustc-link-search=native=/opt/ros/foxy/lib
cargo:rustc-link-lib=dylib=rcl
cargo:rustc-link-lib=dylib=rcl_logging_spdlog
cargo:rustc-link-lib=dylib=rcl_yaml_param_parser
cargo:rustc-link-lib=dylib=rcutils
cargo:rustc-link-lib=dylib=rmw
cargo:rustc-link-lib=dylib=rosidl_typesupport_c
cargo:rustc-link-lib=dylib=rosidl_runtime_c

stderr:

Generate bindings file '/app/r2r/target/debug/build/r2r_rcl-767eccf1419ba33f/out/5c2228f77f6ab7d9477fa2290f42d66457149b31bbc7a1dddb8b55a7bdfae55e/rcl_bindings.rs'

Seems like binding is generated. I compare 5c2228f77f6ab7d9477fa2290f42d66457149b31bbc7a1dddb8b55a7bdfae55e/rcl_bindings.rs with r2r/r2r_rcl/rcl_bindings.rs, the previous one doesn't contain enum RCUTILS_LOG_SEVERITY, I think that cause this issue.

No idea where I should go after this. Any suggestions will be appreciated.

The Parameter support does not seem to match what ROS2 calls parameters

Looking at the parameters example code it appears that that this crates notion of parameters does not patch ROS2 notion of parameters.

From my understanding of ROS2 parameters they are are attributes of a Node that can be get and set by other nodes, I'm new to this library (and to ROS2) but I don't really see how this library implements that functionality? It seems that it is just reading the values specified via --ros-args and adding them to a hash map for the code to use, is that correct?

sensor_msgs cannot found

Hello I am trying to use sensor_msgs, Intellisense can read the sensor_msgs but when i try to build it with colcon it issues about sensor_msgs. I added sensor_msgs into config.toml but still it is not working.

The error :

error[E0433]: failed to resolve: could not find sensor_msgs in r2r
--> ahrar/src/data.rs:14:10
|
14 | use r2r::sensor_msgs::msg::Image;
| ^^^^^^^^^^^ could not find sensor_msgs in r2r

Config.toml :

IDL_PACKAGE_FILTER = { value = "std_msgs;geometry_msgs;sensor_msgs;px4_msgs" }

By the way i have tried to build it with cargo build, first it complained about geometry_msgs after adding it into IDL_PACKAGE_FILTER, errors gone for cargo.

Public `from_serialized_bytes` and Untyped support

I am working on a project where I am reading data with the mcap rust library. In short, I get the messages' schema as string and data as u8[], and I need to convert it to some generic data types (or JSON). Ideally

Ideally, I could use the from_serailized_bytes function from msg_types but that module is private and the function is not accessible from outside. The same goes for the Untyped traits which I believe would be helpful to deserialize messages with known but not hard coded schema names.

So my questions are:

  • What do you suggest, what would be the best approach for my use case?
  • If it requires to make a few of the libraries functions/traits public, would you open to do that?

Thanks!

Bug: Incorrect message name conversion to snake case

Steps to reproduce:

  1. Clone https://github.com/m-dahl/r2r_minimal_node
  2. Create a copy of the Hello.msg message with name AB01CD02.msg and add it to CmakeLists.txt
  3. Try to build the project using colcon build

Actual result:

  • msg_includes.h imports the generated header for the message as ab01bc02.h
  • The generated header is actually ab01_bc02.h
  • The build fails with output:
Generate bindings in '/root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750'
  /root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750/msg_includes.h:15:10: fatal error: 'r2r_minimal_node_msgs/msg/ab01cd02.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750/msg_includes.h:15:10: fatal error: 'r2r_minimal_node_msgs/msg/ab01cd02.h' file not found\n")', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r_msg_gen-0.3.8/build.rs:171:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
gmake[2]: *** [CMakeFiles/cargo_target.dir/build.make:70: CMakeFiles/cargo_target] Error 101
gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/cargo_target.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Expected result:

  • The msg_includes.h imports correctly the generated header
  • The build is successful

Generate bindings for Windows

Hello,

I am trying to generate bindings on windows, and I am having some problems.
First is a problem with path separators on windows being ';' instead of ':'.
I was able to fix this with a helper function in r2r_common.
The big problem though was trying to run builder for r2r_rcl.
It spits out errors on rcutils/allocator.h:82:1: error: unknown type name 'Check_return'
and alot of warnings: 'dllimport' attribute only applies to functions, variables, classes, and Objective-C interfaces [-Wignored-attributes]
This points too bindgen is struggling with the attribute tags used throughout rcl.
I am unsure how to resolve this nor was I able to find any hints or suggestions on the internet.

I am running Windows 10, ros2-foxy, LLVM-13.0.0, and rust 1.57.0
I would appreciate any help or suggestions.

Spin in another thread

Sorry for the feature request again!

I want to create a node (and pub/sub or something) and spin in another thread.
We have to call spin_once() of the node, but the node does not implement Send. So it's not possible.

Could you give me some advice to make it possible?

Service client not Send

If i reimplement the client example with tokio, i get the following error:

future cannot be sent between threads safely
within `r2r::WrappedClient<r2r::example_interfaces::srv::AddTwoInts::Service>`, the trait `std::marker::Send` is not implemented for `*mut rcl::rcl_client_impl_t`rustc
client_tokio.rs(1, 1): required by a bound in this
spawn.rs(127, 21): required by this bound in `tokio::spawn`
client_tokio.rs(24, 20): future is not `Send` as this value is used across an await
client_tokio.rs(24, 64): `client` is later dropped here
client_tokio.rs(24, 20): consider moving this into a `let` binding to create a shorter lived borrow
fn spawn<impl Future<Output = ()>>(impl Future<Output = ()>) -> JoinHandle<<impl Future<Output = ()> as Future>::Output>

My code:

use futures::stream::StreamExt;
use r2r;
use r2r::example_interfaces::srv::AddTwoInts;


#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ctx = r2r::Context::create()?;
    let mut node = r2r::Node::create(ctx, "testnode", "")?;

    let mut service = node.create_service::<AddTwoInts::Service>("/add_two_ints")?;
    let client = node.create_client::<AddTwoInts::Service>("/add_two_ints")?;

    println!("waiting for service...");
    while !node.service_available(&client).unwrap() {
        std::thread::sleep(std::time::Duration::from_millis(1000));
    }
    println!("found it");

    tokio::spawn(async move {
        loop {
            let req = service.next().await.unwrap();
            let resp = AddTwoInts::Response {
                sum: req.message.a + req.message.b,
            };
            req.respond(resp);
        }
    });

    tokio::spawn(async move {
        let req = AddTwoInts::Request { a: 10 * 2, b: 3 };
        let resp = client.request(&req).unwrap().await.unwrap();
        println!("{}", resp.sum);
    });

    let handle = std::thread::spawn(move || loop {
        node.spin_once(std::time::Duration::from_millis(100));
    });

    
    handle.join().unwrap();

    Ok(())
}

But this works:

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ctx = r2r::Context::create()?;
    let mut node = r2r::Node::create(ctx, "testnode", "")?;

    let mut service = node.create_service::<AddTwoInts::Service>("/add_two_ints")?;
    let client = node.create_client::<AddTwoInts::Service>("/add_two_ints")?;

    println!("waiting for service...");
    while !node.service_available(&client).unwrap() {
        std::thread::sleep(std::time::Duration::from_millis(1000));
    }
    println!("found it");

    tokio::spawn(async move {
        loop {
            let req = service.next().await.unwrap();
            let resp = AddTwoInts::Response {
                sum: req.message.a + req.message.b,
            };
            req.respond(resp);
        }
    });

    let handle = std::thread::spawn(move || loop {
        node.spin_once(std::time::Duration::from_millis(100));
    });

    let req = AddTwoInts::Request { a: 10 * 2, b: 3 };
    let resp = client.request(&req).unwrap().await.unwrap();
    println!("{}", resp.sum);

    
    handle.join().unwrap();

    Ok(())
}

Even if I create the client inside the spawn with access to the node via Arc, i get the same error. Maybe it is possible to just make it safe?

Parsing Rust file based on linebreak is not stable

fn add_constants(key: &str, bindings: &str, constants: &mut HashMap<String, Vec<(String, String)>>) {
    let mut lines = bindings.lines();
    ...
}

In the PR for constants, the implementation is as above. However, this is not reliable and stable, because the result of bindgen does not guarantee to be of the correct format.

When built in an environment that has rustfmt installed, the msg_bindings.rs is generated in the correct format. However, when built in an environment without rustmt, the msg_bindings.rs is generated as a single-line file, which in turn fails the whole building because the action-related constants are not generated correctly.

Should we use syn to parse a rust file instead?

Get publisher infos by topic

Hi there,

I have a use case where I have to use some publishers info, such as topic type, qos profile

notice r2r already has rcl_get_publishers_info_by_topic binding, it would be nice to have a get_publishers_info_by_topic function under Node struct.

here are the generic cpp version to get the topic endpoint info: https://github.com/ros2/rclcpp/blob/2bb1dc2c716ae12a24145891724f8436aa4e52bd/rclcpp/src/rclcpp/node_interfaces/node_graph.cpp#L663

I'm happy to try and implement this for r2r, just wondering if there is any concern I should to be aware of ..

Thanks!

Example for a custom service

Sorry if this is something that should be obvious to an experienced ROS developer but how would one go about creating a custom service, the existing example uses a predefined service from ROS examples

The readme discusses auto generation of bindings and msg but it's unclear to me what the process is.

Regression: Commit e33a57c causes "'rcl/rcl.h' file not found"

The commit e33a57c drops include search paths such as rcl/rcl.h, causing bindgen to fail. The commit discards the paths from CMAKE_INCLUDE_DIRS, which is set by source install/setup.*sh. This change must be reverted.

    Updating crates.io index
   Compiling r2r_rcl v0.8.0
   Compiling r2r_actions v0.8.0
error: failed to run custom build command for `r2r_actions v0.8.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/my-project/src/artc_obj_detect/target/debug/build/r2r_actions-23cc6fc28ac64f3c/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AMENT_PREFIX_PATH
  cargo:rerun-if-env-changed=CMAKE_PREFIX_PATH
  cargo:rerun-if-env-changed=CMAKE_IDL_PACKAGES
  cargo:rerun-if-env-changed=IDL_PACKAGE_FILTER
  cargo:rerun-if-env-changed=ROS_DISTRO
  cargo:rustc-cfg=r2r__ros__distro__humble

  --- stderr
  Generate bindings file '/my-project/src/artc_obj_detect/target/debug/build/r2r_actions-0e340de0d2d46a2f/out/e8cb6e9dff909737e080a658a09734b2760d27887417748b639d0bdf6ec58362/action_bindings.rs'
  src/action_wrapper.h:1:10: fatal error: 'rcl_action/rcl_action.h' file not found
  thread 'main' panicked at /home/aeon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r_actions-0.8.0/build.rs:94:10:
  Unable to generate bindings: ClangDiagnostic("src/action_wrapper.h:1:10: fatal error: 'rcl_action/rcl_action.h' file not found\n")
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
     1: core::panicking::panic_fmt
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
     2: core::result::unwrap_failed
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/result.rs:1652:5
     3: core::result::Result<T,E>::expect
     4: build_script_build::generate_bindings
     5: build_script_build::run_bindgen
     6: build_script_build::main
     7: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `r2r_rcl v0.8.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/my-project/src/artc_obj_detect/target/debug/build/r2r_rcl-ecf2c203705bd96f/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AMENT_PREFIX_PATH
  cargo:rerun-if-env-changed=CMAKE_PREFIX_PATH
  cargo:rerun-if-env-changed=CMAKE_IDL_PACKAGES
  cargo:rerun-if-env-changed=IDL_PACKAGE_FILTER
  cargo:rerun-if-env-changed=ROS_DISTRO
  cargo:rustc-cfg=r2r__ros__distro__humble

  --- stderr
  Generate bindings file '/my-project/src/artc_obj_detect/target/debug/build/r2r_rcl-7e07310182565eb6/out/e8cb6e9dff909737e080a658a09734b2760d27887417748b639d0bdf6ec58362/rcl_bindings.rs'
  src/rcl_wrapper.h:9:10: fatal error: 'rcl/rcl.h' file not found
  thread 'main' panicked at /home/aeon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r_rcl-0.8.0/build.rs:99:10:
  Unable to generate bindings: ClangDiagnostic("src/rcl_wrapper.h:9:10: fatal error: 'rcl/rcl.h' file not found\n")
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
     1: core::panicking::panic_fmt
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
     2: core::result::unwrap_failed
               at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/result.rs:1652:5
     3: core::result::Result<T,E>::expect
     4: build_script_build::gen_bindings
     5: build_script_build::run_bindgen
     6: build_script_build::main
     7: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Question about the `spin_once` function

How does the spin_once function differ from it's python equivalent? Looking at the rclpy source code, the spin it seems like it is also just calling spin_once in a loop. But the big difference is that the python code for a minimal node that does nothing, takes about 4% of CPU usage, while the r2r Node instantly utilizes 100% of one core.

Rust code:

pub fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ctx = r2r::Context::create()?;
    let mut node = r2r::Node::create(ctx, "test", "test")?;

    loop {
        node.spin_once(std::time::Duration::from_millis(500));
    }
}

Python code:

import rclpy

rclpy.init()
test_node = rclpy.create_node('test_node')
while rclpy.ok():
  rclpy.spin_once(test_node)

Is there a way to achieve a behavior similar to the python one? ( For my use case it's necessary that the CPU usage stays relatively low )

[Discussion] support ROS_TIME from /clock source

Hi, I noticed the latest implementation has ros_time clock type, but it does not subscribe to the clock from /clock topic.

I am quite new to Rust and ros2, could you advise me on how to implement it? or is there a solution to use sim time with r2r?

Cheers.

Implementing Actions

I was wanting to implement a custom action server; however, I cannot find any documentation or examples that address this. I was able to find the action server example. However, this example seems to merely be a frontend for the Fibonacci example action, which I was unable to find the source for.

I get the feeling that I'm almost certainly missing something easy, but I couldn't find any other users asking about this on this issues page or elsewhere (such as the ROS discourse forum).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.