Coder Social home page Coder Social logo

openrr's Introduction

openrr: Open Rust Robotics

Build Status crates.io codecov docs

For developers and future users

docs discord tutorial

OpenRR (pronounced like "opener") is Open Rust Robotics platform.

It's heavily under development.

Supported Platforms

OS Core GUI ROS ROS2
Linux (Ubuntu)
macOS
Windows
  • You can use ROS without ROS installation on Linux/macOS.
  • ROS2 Support is experimental. See arci-ros2 for details.

Dependencies

Linux

sudo apt install cmake build-essential libudev-dev xorg-dev libglu1-mesa-dev libasound2-dev libxkbcommon-dev protobuf-compiler
  • cmake build-essential (openrr-planner (assimp-sys))
  • libudev-dev (arci-gamepad-gilrs)
  • xorg-dev libglu1-mesa-dev libxkbcommon-dev (openrr-gui (egui))
  • libasound2-dev (arci-speak-audio)
  • protobuf-compiler (openrr-remote)

Architecture

architecture

arci is a hardware abstraction layer for openrr. Currently ROS1 and urdf-viz (as a static simulator (actually it's just a viewer)) are implemented.

You can write platform/hardware independent code if you use arci traits.

What is OpenRR?

OpenRR contains..

  • abstract robot interfaces (arci)
  • concrete implementation of the interfaces (arci-ros, arci-urdf-viz, ...)
  • library which uses the interfaces (openrr-client, ...)
  • tools (openrr-apps)
  • pure libraries nothing to do with arci (openrr-planner, ...)

Tools

Currently we have some tools to control real/sim robots.

See openrr-apps for details.

joint_trajectory_sender

Inspired by joint_state_publisher_gui

joint_sender

You can use this GUI not only for ROS but anything if you implement arci::JointTrajectoryClient and write a small binary main function.

robot_command

General CLI to access arci robot clients. It supports not only sending joint trajectory directly but it supports inverse kinematics with self-collision check, and navigation.

Format

To format use nightly rustfmt,

cargo +nightly fmt

License

Licensed under the Apache License, Version 2.0.

Related openrr repositories

  • k : kinematics library
  • ros-nalgebra : rosrust nalgebra converter generator
  • rrt : RRT-dual-connect path planner
  • trajectory : trajectory interpolator
  • urdf-rs : URDF parser
  • urdf-viz: URDF visualizer
  • gear : (deprecated) motion planning library, but it is openrr-planner now.

Why OpenRR?

We strongly believe that Rust is the future of robotics. OpenRR is the world first robotics platform which is made by Rust, made for Rust. It can be a reference, a base for the future robotic people, like us.

Contribution

We appreciate for your any contributions! Create an issue at first!

Here is a discord server.

Using OpenRR

You can read the tutorial books at the following links.

openrr's People

Contributors

a-miyadera avatar abrzozowski avatar chatblanc-ciel avatar dependabot[bot] avatar h1rono avatar kaaatsu32329 avatar mitsuharu-kojima avatar otl avatar sktometometo avatar ssr-yuki avatar taiki-e 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

openrr's Issues

Make rosrust::init process more easy

    #[cfg(feature = "ros")]
    let use_ros = robot_config.has_ros_clients();
    #[cfg(feature = "ros")]
    if use_ros {
        arci_ros::init("openrr_apps_joint_position_sender");
    }

can be

    robot_config.prepare("node_name");

and

  fn prepare(&self, name: &str) {
      #[cfg(feature = "ros")]
      if self.has_ros_clients() {
          arci_ros::init(name);
      }
   }

Release v0.0.1

I don't know how to release workspace style crates.

  • release v0.0.1
  • continue to develop
  • release every two months (??)
  • Modify relative paths in Cargo.toml
  • Update Cargo.toml (description, categories...)
  • arci
  • arci-gamepad-gilrs
  • arci-ros
  • arci-speak-cmd
  • openrr-planner
  • openrr-sleep
  • arci-urdf-viz (depend on openrr-sleep and openrr-planner)
  • openrr-client
  • openrr-teleop
  • openrr-command
  • openrr-gui
  • openrr-apps
  • openrr

Enable ros feature in openrr-apps as default

Currently if we enable ros feature as default, building on Windows become difficult.
If we could switch default feature by OS, it can be done easily but it seems that it is not possible for me.
How should we solve the situation?

Publish v0.0.3

  • arci
  • arci-gamepad-gilrs
  • arci-ros
  • arci-speak-cmd
  • arci-speak-audio
  • openrr-planner
  • openrr-sleep
  • arci-urdf-viz (depend on openrr-sleep and openrr-planner)
  • openrr-client
  • openrr-teleop
  • openrr-command
  • openrr-gui
  • openrr-apps
  • openrr

arci-gamepad-gilrs is not working in MacOS

Below logic prevent the process.
I don't know why but .gamepads() is empty but it works if the check functionality is disabled in MacOS.

for (connected_id, gamepad) in gil.gamepads() {
info!("{} is {:?}", gamepad.name(), gamepad.power_info());
if id == connected_id.into() {
is_found = true;
}
}
if !is_found {
panic!("No Gamepad id={} is found", id);
}

Change Speak trait interface

Current

pub trait Speaker: Send + Sync {
    fn speak(&self, message: &str);
}

Proposed

pub trait Speaker: Send + Sync {
    async fn speak(&self, message: &str) -> Result<()>;
}

It should be async because it takes sometime to finish speaking.
And it might be failed.

openrr-gui (joint_position_sender) small improvements

  • Change duration of send_joint_positions: 1 nano sec -> 100msec (1nano sec is super small. 100msec can be acceptable) (Optional: Set the duration by GUI); #135
  • Button label: Center -> Zero: Center means (high limit + low limit) * 0.5 normally. It works as zero position now. (And sending center is useless actually (sending zero is useful)); #134

Update kiss3d and nalgebra

It seems kiss3d 0.29 that fixes sebcrozet/kiss3d#262 has been released, but that depends on a new version of nalgebra (0.24).

openrr/Cargo.toml

Lines 33 to 34 in 89cec32

# https://github.com/sebcrozet/kiss3d/issues/262
kiss3d = { git = "https://github.com/sebcrozet/kiss3d", rev = "6274d50" }

Some dependencies need to be updated first for openrr to switch to kiss 0.29 and nalgebra 0.24.

See #121 for the current status.

RobotConfig urdf path problem

When It is relative, the path is from the config file (It is not described in the README.md
). This was useful for some cases, but it's difficult for everyone (everyone needs to edit config file to try our samples.).
If it's a full path, it works fine. But not good.
This can be solved by more configureable parameter system #78 but it is a future.

How about adding --urdf-path argument to overwrite the config? Then we can use rospack if we want.

  • Add description in the README.md about relative path
  • Add --urdf-path for all apps

Use tokio=1.0

tokio is already reached version 1.0.0.
We should use it instead of 0.2 or 0.3.

RosNavClient::send_pose() return Ok even if timeout!!

It's not clear what should send_pose() returns, but i think it's a bug.

  • Make it clear what should send_pose() returns
  • fix it

In the #144, there are discuss about the naming of send_pose()

Navigation::send_pose() -> Navigation::send_goal_pose()

send_pose() is not send_goal_pose().
It's actually move_to.

Use environmental variable to set config for openrr_apps_*

I'm thinking that openrr_apps_robot_config is like a shell program.
We have to think of calling it many times.
The config argument is verbose!

Using env variable are dangerous and it causes bugs, but there are no way to make it realize what i want to do.

Implement local command arci::Speak

arci::Speak can be implemented as a local command.

We can use bellow commands depends on the OS.

  • MacOS: say
  • Linux: espeak (not default but easy to use)
  • Windows: I don't know!

Configurable parameter system

toml is simple, and it's great. But sometimes we need more complicated configurable parameter system.

  • replace value by argument
  • include other toml files from toml file
  • overwrite default values by another toml file

We have to use google at first to confirm that there are no system which realize our needs.

Improve arci/src/waits.rs logic (JointTrajectoryClient)

Current logic waits until |target - current| is smaller than threshold with constant timeout.
If the timeout is 10sec, and the motion duration is 20sec(call this input duration bellow), it returns timeout error always.
We need some improvements about it.
I think this issue means that we want to reduce the timeout sec, because timeout sometimes happens, and it prevent debug/development.
Basicly we need to add duration to wait() function at first.

  • Plan1: Just use total timeout( = input duration + timeout)
  • Plan2: Start checking after input duration and wait until (input duration + timeout).
  • Plan3: If we want to return fast, even if the time is not elapsed but the target is reached, start checking a little before the input duration.

Plan1 is fine?

openrr-gui: Improvement of joint_position_sender

Features

  • Add text box(?) to set the duration. #101 (comment) (Currently I ordered to use 100msec); done in #210
    The unit of time should be f64 sec.

Bugfixes

  • Depending on how to move slider, response on urdf-viz side is very slow #108; fixed by #130

Resolve TODOs

More openrr-gui

  • GUI to set ik target (openrr::client::IkClient)
  • GUI to set BaseVelocity (arci::MoveBase) like this; #323

Implement wav speaker

I want a robot speak Japanese or more language, using Speaker trait.

https://github.com/openrr/openrr/blob/main/arci/src/traits/speaker.rs

If there are a code bellow,

speaker.speak("move to zero");

Say 'こんにちは'.

The struct will be like below

struct AudioSpeaker {
  message_to_file_path: HashMap,
}

impl Speaker for AudioSpeaker {
  fn speak(&self, message: &str) {
    if let Some(path) = message_to_file_path(message) {
      play_file(path);
    }
  }
}

You can use some libraries like, https://github.com/RustAudio/rodio.

Let's create new crate arci-speak-audio.

cargo doc warning on arci

 Documenting arci v0.0.1 (/var/lib/jenkins/workspace/openrr-docs/arci)
warning: unresolved link to `i`
  --> arci/src/clients/joint_velocity_limiter.rs:10:40
   |
10 | /// The duration for a TrajectoryPoint[i] is set to
   |                                        ^ the module `joint_velocity_limiter` contains no item named `i`
   |
   = note: `#[warn(broken_intra_doc_links)]` on by default
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `i`
  --> arci/src/clients/joint_velocity_limiter.rs:10:40
   |
10 | /// The duration for a TrajectoryPoint[i] is set to
   |                                        ^ the module `joint_velocity_limiter` contains no item named `i`
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

send_joint_positions GUI

send joint positions from GUI like
http://wiki.ros.org/joint_state_publisher

image

  • Input: urdf file and toml config file

  • Output: JointTrajectoryCline send_joint_positions()

  • Load urdf file and get joint names and joint limits.

  • Creat Slider bar using the joint names and limits.

  • Send joint positions when slider is moved.

arci-ros and arci-urdf-viz should be used as implementations of JointTrajectoryClient.

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.