10000 feat(arx): support arx arm by villekuosmanen · Pull Request #364 · huggingface/lerobot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(arx): support arx arm #364

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
< 10000 template data-target="ref-selector.noMatchTemplate">
Branch not found: {{ refName }}
from

Conversation

villekuosmanen
Copy link
Contributor
@villekuosmanen villekuosmanen commented Aug 18, 2024

What this does

Adds the ARX5 arm integration, used as part of an older model of the AgileX Cobot Magic, as well as separately.

Uses the ARX5 SDK for communication between hardware devices.

Note that the ARX5 arms provide their own calibration when correctly installed so the calibration process used for koch arms should not be necessary.

How it was tested

I have tested it many times using both single-arm and bimanual data collection and inference. No unit tests though.

Would be cool if anyone who has the ARX5 arm could try and replicate it.

How to checkout & try? (for the reviewer)

You will need an arx 5 arm. You need to set the model type (X5 or L5) in the config, as well as the interface name (can be a CAN port or an EtherCat interface name, both are supported). Then run the following:

python lerobot/scripts/control_robot.py record --robot-path lerobot/configs/robot/arx5.yaml --fps 50 --root data --repo-id you-name/repo-name --num-episodes 5 --warmup-time-s 2

Comment on lines +255 to +256
if not self.camera.isOpened():
raise OSError(f"Camera {self.camera_index} could not be opened.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting a strange issue where you could create the camera but it did not open. forgot why exactly but this helped debug it.

@@ -88,12 +88,12 @@ def from_raw_to_lerobot_format(
raise NotImplementedError

# sanity check
check_format(raw_dir)
check_format(videos_dir)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this was wrong before, though not sure if it is actually used. happy to revert it if necessary.

Comment on lines +428 to +429
if key != 'language_instruction':
batch[key] = batch[key].to(device, non_blocking=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably a separate change, but how should we handle language instructions? We could either use a tokeniser or the languagew model itself here to ensure the data is placed into the device (GPU) from the start, or do it in the model though that may be less performant as not all instructions run in CUDA?

leader_arms:
main:
model: L5
interface_name: enx5c5310ecc0ec
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these need to be set based on your own robot's serial number. I wonder if there is a way to allow a user to specify them without making edits to this file?

<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com)
Commit Version: 1.6.0-4-g7f85cfe Build Version: 1.6.7995.38578
For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot name="ultron_v1.1_aa">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed for gravity compensation

@@ -605,7 +605,7 @@ def on_press(key):
ep_dict["next.done"] = done

ep_path = episodes_dir / f"episode_{episode_index}.pth"
print("Saving episode dictionary...")
print(f"Saving episode dictionary {episode_index}...")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this helped me with logging

@villekuosmanen villekuosmanen marked this pull request as ready for review October 5, 2024 10:27
@Cadene Cadene self-requested a review October 7, 2024 10:18
@CarolinePascal CarolinePascal added enhancement Suggestions for new features or improvements robots Issues concerning robots HW interfaces labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestions for new features or improvements robots Issues concerning robots HW interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0