Skip to content

Add cu_feetech component for Feetech servo bus (STS3215, SO101)#844

Merged
gbin merged 8 commits into
copper-project:masterfrom
NRdrgz:nico/add_cu_feetech
Feb 20, 2026
Merged

Add cu_feetech component for Feetech servo bus (STS3215, SO101)#844
gbin merged 8 commits into
copper-project:masterfrom
NRdrgz:nico/add_cu_feetech

Conversation

@NRdrgz

@NRdrgz NRdrgz commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds cu_feetech bridge component as well as an example for it.
It allows to control the SO-101 arm which uses Feetech STS3215 servo bus
Adds a calibration tool so messages can be passed as Raw, Deg, Rad or Normalized
The demo demonstrates usage of 1 SO101 arm or 2 arms in leader - follower context.
Tested with SO101 at home!

First PR on the repo, highly open for feedbacks/changes

Related issues

  • Closes #

Changes

Testing

  • just fmt
  • just lint
  • just test
  • optional full just std-ci (if std/runtime paths are impacted)
  • optional full just nostd-ci (if embedded/no_std paths are impacted)
  • Other (please specify):

pro-tip: just with no parameters in the root defaults to just fmt, just lint, and just test.

Checklist

  • I have updated docs or examples where needed
  • I have added or updated tests where needed
  • I have considered platform impact (Linux/macOS/Windows/embedded)
  • I have considered config/logging changes (if applicable)
  • This change is not a breaking change (or I documented it below)

Breaking changes (if any)

Additional context

@github-actions

Copy link
Copy Markdown

Hi! Thanks for opening this pull request.

Because this is your first time contributing to this repository, please read our contributor guide:
https://github.com/copper-project/copper-rs/blob/master/CONTRIBUTING.md

@gbin gbin added enhancement New feature or request include in changelog labels Feb 19, 2026

@gbin gbin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits, feel free to push back, awesome contribution!!

}

// Read the variable-size portion: error + data + checksum.
let mut remaining = vec![0u8; length];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to use fixed size structures on the stack as much as possible like smallvec or heapless. This helps reducing the jitter on tight executions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done by using heapless

Comment thread components/bridges/cu_feetech/src/lib.rs
Comment thread components/bridges/cu_feetech/src/lib.rs
Comment thread components/bridges/cu_feetech/src/lib.rs
}

// ---- Ticks per revolution (model-dependent; used for deg/rad) ----
let ticks_per_rev = cfg.get::<f64>("ticks_per_rev")?.unwrap_or(4096.0) as f32;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it really be a float?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No you're right on that, switched to u32

///
/// Values are `f32` so they can carry raw ticks, degrees, or radians
/// depending on the bridge configuration.
pub type JointPositions = CuArray<f32, MAX_SERVOS>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit but feel free to ignore: if they are ticks we could template that with an uint32? or uint16? (some MCUs love ints).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are either raw ticks, degrees or radians, depending on the configuration passed by the .ron file so that's why I set it up as f32

| Mission | Description |
|-------------------|-------------|
| **arm_publisher** | Read positions from one arm and log them. |
| **leader_follower** | Leader arm (serial0) is moved by hand; follower arm (serial1) copies its positions. Each arm uses its own calibration file. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is super rad!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

NRdrgz and others added 2 commits February 20, 2026 17:22
- Use heapless Vec instead of Vec
- Have tick_per_rev as u32 instead of f32
@gbin

gbin commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

good to go, if CI passes I'll merge it, thanks for the awesome contrib!

@NRdrgz

NRdrgz commented Feb 20, 2026

Copy link
Copy Markdown
Contributor Author

Forgot to fix format before pushing my previous commit - CI will probably fail

@gbin gbin merged commit b4c3c87 into copper-project:master Feb 20, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants