Skip to content

Commit a68ae52

Browse files
Work on doc.
1 parent cde4910 commit a68ae52

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## version 1.0.0
2+
3+
- Cleanup APIs to offer two interfaces:
4+
- high-level interface (Controller) with a simple API for the most common use cases.
5+
- low-level interface (DynamixelProtocolHandler) for direct access to the protocol and fine-grained control of the bus ownership.
6+
- Add Python bindings for the library (controller API).
7+
- Add support for the feetech servo.
8+
- Define register conversion at the macro level to simplify the code.
9+
110
## Version 0.6.0
211

312
- Add dxl XL330 support

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
## Getting started
1212

13-
Rustypot is a communication library for Dynamixel/Feetech motors. It is used in the [Reachy project](https://www.pollen-robotics.com/reachy/). More types of servo can be added in the future.
13+
Rustypot is a communication library for Dynamixel/Feetech motors. It is notably used in the [Reachy project](https://www.pollen-robotics.com/reachy/). More types of servo can be added in the future.
1414

1515
## Feature Overview
1616

1717
* Relies on [serialport](https://docs.rs/serialport/latest/serialport/) for serial communication
1818
* Support for dynamixel protocol v1 and v2 (can also use both on the same bus)
1919
* Support for sync read and sync write operations
2020
* Easy support for new type of motors (register definition through macros). Currently support for dynamixel XL320, XL330, XL430, XM430, MX*, Orbita 2D & 3D.
21-
* Pure Rust
21+
* Pure Rust plus python bindings (using [pyo3](https://pyo3.rs/)).
2222

2323
To add new servo, please refer to the [Servo documentation](./servo/README.md).
2424

@@ -76,11 +76,36 @@ fn main() {
7676

7777
See https://docs.rs/rustypot for more information on APIs and examples.
7878

79+
See [python/README.md](./python/README.md) for information on how to use the python bindings.
80+
81+
## Python bindings
82+
83+
The python bindings are generated using [pyo3](https://pyo3.rs/). They are available on `pypi`(https://pypi.org/project/rustypot/). You can install them using pip, pix, uv, etc.
84+
85+
To build them locally, you can use [maturin](https://www.maturin.rs).
86+
87+
```bash
88+
maturin build --release --features python
89+
```
90+
91+
or, if you want to install them in your local python environment:
92+
93+
```bash
94+
maturin develop --release --features python
95+
```
96+
97+
See [maturin official documentation](https://maturin.rs) for more information on how to use it.
98+
99+
## Contributing
100+
101+
If you want to contribute to Rustypot, please fork the repository and create a pull request. We welcome any contributions, including bug fixes, new features, and documentation improvements.
102+
We especially appreciate support for new servos. If you want to add support for a new servo, please follow the instructions in the [Servo documentation](./servo/README.md).
103+
79104
## License
80105

81106
This library is licensed under the [Apache License 2.0](./LICENSE).
82107

83108
## Support
84109

85-
Rustypot is developed and maintained by [Pollen-Robotics](https://pollen-robotics.com). They developped open-source tools for robotics manipulation.
110+
Rustypot is developed and maintained by [Pollen-Robotics](https://pollen-robotics.com). They developped open-source hardware and tools for robotics.
86111
Visit https://pollen-robotics.com to learn more or join the [Discord community](https://discord.com/invite/Kg3mZHTKgs) if you have any questions or want to share your projects.

src/servo/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
> ⚠️ **Warning:** This documentation is only intended for servos that communicate via the Dynamixel Protocol (v1 or v2), such as the Robotis Dynamixel or Feetech servos.
44
5-
* Create a new file in the service folder (or a subfolder such as feetech or dynamixel), for instance [sts3215.rs](./servo/feetech/sts3215.rs) in the feetech folder. Make sure to add its declaration in the parent module (for instance in [./servo/feetech/mod.rs]) as they must be explicitly declared in Rust. Something like this:
5+
* Create a new file in the service folder (or a subfolder such as feetech or dynamixel), for instance [sts3215.rs](./feetech/sts3215.rs) in the feetech folder. Make sure to add its declaration in the parent module (for instance in [./feetech/mod.rs]) as they must be explicitly declared in Rust. Something like this:
66
```rust
77
pub mod sts3215.rs
88
```
99

10-
* Add the servo definition in the new file. You can use the [XL430](./servo/dynamixel/xl430.rs) as a template. The macro should defined the `name` of the servo, the `protocol version` used and then a list of all registers with their name, address, access and type.
10+
* Add the servo definition in the new file. You can use the [MX](./servo/dynamixel/mx.rs) as a template. The macro should defined the `name` of the servo, the `protocol version` used and then a list of all registers with their name, address, access, type and conversion type (can be set to None to get the raw register value).
1111

12-
* Finally, add the servo registration in the servo root module [./servo/mod.rs]. You can specify all variants supported by your servo definition. This registration allows for the scan function to detect your new kind of servo.
12+
* Finally, add the servo registration in the servo root module [./mod.rs]. You can specify all variants supported by your servo definition. This registration allows for the scan function to detect your new kind of servo.
13+
14+
By doing this, you will be able to use the servo in the same way as the other servos. The servo will be automatically detected and registered when you run the scan function. You can then use it in your application.
15+
16+
It will be available in the rust lib but also the python bindings.
17+
18+
### Conversion types
19+
20+
If you want to define custom conversion function for a register (such as transforming the raw encode position to radians for instance), you need to define a struct that implements the `Conversion` trait.
21+
22+
See the [AnglePosition](./dynamixel/mx.rs) for an example. You can see that the `position` register uses the `AnglePosition` conversion type.

0 commit comments

Comments
 (0)