Skip to content

refactor/lekiwi robot #863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

imstevenpmwork
Copy link
Collaborator

@imstevenpmwork imstevenpmwork commented Mar 14, 2025

What this does

Ports LeKiwiRobot to the new robot architecture
This PR is meant to be Rebase & Merge

How it was tested

(before the rebase against the latest motor API)
Tested with a S0100 as a leader arm + the Mac keyboard vs a Remote Lekiwi Robot
Dataset recorded (remotely): https://huggingface.co/datasets/imstevenpmwork/lekiwi

@imstevenpmwork imstevenpmwork added refactor Code cleanup or restructuring without changing behavior robots Issues concerning robots HW interfaces labels Mar 14, 2025
@imstevenpmwork imstevenpmwork self-assigned this Mar 14, 2025
@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch 6 times, most recently from 8458616 to 2a04a2a Compare March 19, 2025 15:58
@imstevenpmwork imstevenpmwork marked this pull request as ready for review March 19, 2025 16:16
@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch from 435dee5 to c9d7a88 Compare March 21, 2025 09:47
@imstevenpmwork
Copy link
Collaborator Author

@aliberts This PR has been rebased with the latest changes of user/aliberts/2025_02_25_refactor_robots

@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch 4 times, most recently from 447496d to 4ec2ef5 Compare April 7, 2025 14:50
@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch 3 times, most recently from 7719882 to a0657ee Compare April 17, 2025 12:41
@imstevenpmwork
Copy link
Collaborator Author

@aliberts This PR has been rebased onto the latest changes from the refactor_robots branch (2025-04-25), including all commit before: Fix calibration msg display (including this one).

Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

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

I have left many comments regarding comments.

My general take is: Whenever there's a comment somewhere, this means the code its commenting isn't readable enough -> should be fixable 90% of the time by just better code/naming. I prefer reading 10 additional lines of intelligible code than 1 line of comment (exception made for configs and docstring, obv)

Moreover, if the comment is a TODO, then this means there's something wrong here that we didn't take the time to fix now, and we're adding debt for our future selves to solve. The goal of these refactoring PRs should be to remove the TODOs as much as possible, not add more of them :')

Don't hesitate to comment code on github directly if there's something about which you'd like to get the reviewer's attention.

Let's not use the codebase as a notepad and work our way through this now. We abused them in the past and I think it's time to get rid of them.

@imstevenpmwork
Copy link
Collaborator Author

Awesome! Thanks for taking the time to do the in-depth review. I will target the comments asap so we can move forward 🦾

@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch 4 times, most recently from 291bd89 to dffb69e Compare April 23, 2025 07:51
aliberts and others added 16 commits April 23, 2025 11:16
chore(teleop): Add missing abstract methods to keyboard implementation

refactor(robots): update lekiwi client and host code for the new api

chore(config): update host lekiwi ip in client config

chore(examples): move application scripts to the examples directory

fix(motors): missing type check condition in set_half_turn_homings

fix(robots): fix assumption in calibrate() for robots with more than just an arm

fix(robot): change Mode to Operating_Mode in configure write for lekiwi

fix(robots): make sure message is display in calibrate() method lekiwi

fix(robots): no need for .tolist() in lekiwi host app

fix(teleop): fix is_connected in teleoperator keyboard

fix(teleop): always display calibration message in so100

fix(robots): fix send_action in lekiwi_client

debug(examples): configuration for lekiwi client app

fix(robots): fix send_action in lekiwi client part 2

refactor(robots): use dicts in lekiwi for get_obs and send_action

dbg(robots): check sent action wheels lekiwi

debug(robots): fix overflow base commands

debug(robots): fix how we deal with negative values lekiwi

debug(robots): lekiwi sign degrees fix

fix(robots): right motors id in lekiwi host

chore(doc): update todos

chore(doc): added todos
@imstevenpmwork imstevenpmwork force-pushed the refactor/lekiwi_robot branch from dffb69e to c882875 Compare April 23, 2025 09:19
Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

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

Nice improvements! Let's iterate a bit more on this but I think we're getting close to a merge

aliberts
aliberts approved these changes Apr 24, 2025
Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

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

Fix approval mistake (just ignore this)

Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@aliberts aliberts merged commit 2e528a8 into user/aliberts/2025_02_25_refactor_robots Apr 29, 2025
4 of 7 checks passed
@aliberts aliberts deleted the refactor/lekiwi_robot branch April 29, 2025 15:48
@imstevenpmwork imstevenpmwork restored the refactor/lekiwi_robot branch May 14, 2025 09:35
@imstevenpmwork imstevenpmwork deleted the refactor/lekiwi_robot branch May 14, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code cleanup or restructuring without changing behavior robots Issues concerning robots HW interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants