Skip to content
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

where to set the initial joint (position + angle) information when controlling real aloha robot? #334

Open
2 tasks
cong1024 opened this issue Jul 19, 2024 · 4 comments
Assignees

Comments

@cong1024
Copy link

System Info

ubuntu 20

Information

  • One of the scripts in the examples/ folder of LeRobot
  • My own task or dataset (give details below)

Reproduction

Hi Guys, I am using the pr #316 written by Cadene to control the real aloha robot, when running cmd : python control_robot.py teleoperate --robot aloha, I found the follower move fast to HORIZONTAL_POSITION, all arms in HORIZONTAL_POSITION like a line. When I control the follower arm with the master arm, I find that the movement direction of the follower arm is exactly opposite to that of the master arm.
I thinke there may be some bug in code, or my own problem. I tried to figure out the following:

  1. where to set the initial pose info of follower and leader in code
  2. how to solve the opposite moving problem, have you guys met the same problem ?
    Thx

Expected behavior

^^

@Cadene
Copy link
Collaborator

Cadene commented Jul 19, 2024

@cong1024 I will be quick, but happy to help further.

First, checkout origin/main to get the latest version (we merged the PR).
Then, redo the calibration precedure by deleting this file: https://github.com/huggingface/lerobot/blob/main/lerobot/common/robot_devices/robots/koch.py#L305
Click on the image urls during the procedure and carefully match the positions with your arms.

Secondly check that the index of the motor corresponds to what you have with DynamixelWizzard

Without Dynamixel Wizzard, you can try to order each one to move seperately by reading their position and writing a delta position:

goal_position_array, self.leader_arms[name].read("Present_Position")
# update each dim seperately
self.leader_arms[name].write("Goal_Position", goal_position_array)

You can also write one value each time and the name of the motor similarly to:

self.leader_arms[name].write("Goal_Position", GRIPPER_OPEN, "gripper")

You can also access their ID and make sure it goes from 1 to 6:
https://github.com/huggingface/lerobot/blob/main/lerobot/common/robot_devices/motors/dynamixel.py#L38-L39

We are working on a precedure to ensure the motor indices are well set.

@cong1024
Copy link
Author

Thanks for help ! @Cadene , yes ,I have seen the main branch has merged the control of koch robot. For controlling aloha robot, I see the pr is still in draft, maybe working on branch user/rcadene/2024_07_11_control_aloha is better to debug? Since the configuration for aloha and koch is different.
For the rest suggestion, Yes, I will try to working on ! thx~

@Cadene
Copy link
Collaborator

Cadene commented Jul 19, 2024

this branch is not stable, I dont recommend using it

@Cadene
Copy link
Collaborator

Cadene commented Aug 29, 2024

Once this PR merges, Aloha will be natively supported: #316
Sorry for the wait!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants