Rust is a programming language with many benifits. To learn more check this wiki page. The best way to make sure you can work with RUST pain free is to get rustup, so that it will manage all your rust versions and worspaces automatically:
sudo snap install rustup --classic
ROS2 has only two officially supported languages: Python and C++, but in some cases it is useful to have access to other languages as well for creating ROS2 nodes, libraries or tools. To do so, you just need an implementation of RCL, that is to say you need a way of:
- Creating a node
- Publishing messages to a topic
- Subscribing to a topic
- Creating a service
- Creating a service client
- Handling timers
With those 6 basic things you can have an implementation in any language that is able to interface with any ROS2 node. There are many implementaations of RCL:
- rclpy The official RCL implementation in Python. Useful for impelementing small tools quickly and prototyping.
- rclcpp The official RCL implementation in C++. Useful for projects require high performance or strict real-time and you have a high tolerance for pain.
- rclrs. Unofficial implementation of RCL in Rust, and the main concern of this wiki page. Useful for projects that require high performance, strict real-time, or interface with low level hardware.
- rclc Quasi-official implementation of RCL for C. It is developed and maintain by the same team that works on the official implementation.
- rclnodejs Unofficial implementation of RCL for Javascript. Useful for web related tools.
- ros2-java unofficial (and almost deprecated) implementation of RCL for Java. Useful for doing ROS2 stuff for Android.
- matlab You are not able to create real ROS2 nodes, but there is some functionality for subscribing and publishing a limited selection of messages.
There are some ARCOS-Lab projects implemented in Rust already: here is a non-comprehensive (and probably a bit outdated) list:
- arcos-kdl A rust implementation of a kinematics and dynamics library. Sort of a reimplementation of orocos-kdl. You can find the code here and the official latest release is here.
- arcos-pykdl Python bindings for arcos-kdl.
- Hecathoncheires a library for simulating various robots in parallel.
- Abathur A library for simulating evolution of robot bodies.
- install the ARCOS-Lab humanoid robot simulator tutorial here.
- Clone RCLRS repo into your workspace
cd wsr2/src
git clone https://github.com/ros2-rust/ros2_rust.git
- Follow the instructions of the README.