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

Is anyone successfully running Trossen ALOHA robot? I need your help. #9

Open
chokyungjin opened this issue Jul 25, 2024 · 5 comments

Comments

@chokyungjin
Copy link

chokyungjin commented Jul 25, 2024

We hope you're enjoying your time with the happy ALOHA robot.

A few weeks ago, we received an ALOHA robot kit from the U.S. and successfully assembled it in Korea. Currently, we are in the process of running the robot, but we've encountered some challenges along the way. Below are the steps we've taken so far:

  1. Robot assembly -> Completed without any issues.

  2. Software (SW) check on the laptop provided by Trossen -> We faced some issues with ros2 and Python libraries initially, but we believe we have resolved them.

  3. Hardware (HW) connection check -> Completed. We have confirmed that all inputs (cameras, arms, base) are properly recognized by the computer with no problems.

  4. Recording and replaying our own episodes -> Completed without any issues.

  5. Training episodes to create checkpoints -> Completed. We utilized our own episodes from step 4 and a public dataset (aloha_mobile chair_truncated) to generate checkpoints, and encountered no issues.

  6. Evaluating the robot -> We are experiencing issues at this stage. By "evaluating," we mean the process of loading a checkpoint created in step 5 and allowing ALOHA to operate autonomously without human control. We believe this step is executed by the eval_bc() function in imitate_episodes.py. At this point, we have identified two main issues. First, the robot jerks its arms sharply instead of moving smoothly. Second, it produces an error message after evaluation, as shown below.
    We are curious if you have encountered similar issues and managed to complete all these steps without any problems.
    We encountered difficulties only during step 2. Could this be the underlying cause?

Screenshot from 2024-07-25 15-09-16

@shantanuparab-tr
Copy link

To reduce the jerks in the arm's movement, I recommend using the --temporal-agg flag when running the script. If you’re already using temporal aggregation, ensure that the chunk size during training is appropriately set—not too small or too large—as both extremes can lead to jerky motions.

I haven't encountered the RuntimeError mentioned in the image, but I'm happy to help you troubleshoot it if you can provide more details.

@chokyungjin
Copy link
Author

chokyungjin commented Aug 19, 2024

Thank you for your answer, but when we used --temporary-agg, we have an error that does not fit the shape, so we are not currently using it.

https://github.com/Interbotix/act_plus_plus/blob/78d34934e4b5fb2534d301c4b84d3bf9a71ffe51/act_plus_plus/imitate_episodes.py#L404

our model's chunk size is 200, real_robot is True, and BASE_DELAY is 13.

스크린샷 2024-08-19 오후 1 31 24

MarkFzp's act_plus_plus repo also has the same code. Was there any such shape error?

Thank you.

@shantanuparab-tr
Copy link

`if temporal_agg:

                    all_time_actions[[t], t:t+num_queries-BASE_DELAY] = all_actions`

Can you make this change and let me know if it works?

@yuleiqiu
Copy link

`if temporal_agg:

                    all_time_actions[[t], t:t+num_queries-BASE_DELAY] = all_actions`

Can you make this change and let me know if it works?

This works for me. Thank you.

@yuleiqiu
Copy link

yuleiqiu commented Dec 17, 2024

We hope you're enjoying your time with the happy ALOHA robot.

A few weeks ago, we received an ALOHA robot kit from the U.S. and successfully assembled it in Korea. Currently, we are in the process of running the robot, but we've encountered some challenges along the way. Below are the steps we've taken so far:

  1. Robot assembly -> Completed without any issues.
  2. Software (SW) check on the laptop provided by Trossen -> We faced some issues with ros2 and Python libraries initially, but we believe we have resolved them.
  3. Hardware (HW) connection check -> Completed. We have confirmed that all inputs (cameras, arms, base) are properly recognized by the computer with no problems.
  4. Recording and replaying our own episodes -> Completed without any issues.
  5. Training episodes to create checkpoints -> Completed. We utilized our own episodes from step 4 and a public dataset (aloha_mobile chair_truncated) to generate checkpoints, and encountered no issues.
  6. Evaluating the robot -> We are experiencing issues at this stage. By "evaluating," we mean the process of loading a checkpoint created in step 5 and allowing ALOHA to operate autonomously without human control. We believe this step is executed by the eval_bc() function in imitate_episodes.py. At this point, we have identified two main issues. First, the robot jerks its arms sharply instead of moving smoothly. Second, it produces an error message after evaluation, as shown below.
    We are curious if you have encountered similar issues and managed to complete all these steps without any problems.
    We encountered difficulties only during step 2. Could this be the underlying cause?

Screenshot from 2024-07-25 15-09-16

We got a similar error during training. These two errors are probably due to the same reason.

Screenshot from 2024-12-17 18-38-53

We use auto_record.sh to collect a few demonstrations and run the training script provided here. We set the number of training steps as 3000 and evaluate every 500 steps. This process goes well until the second evaluation. The script ends up here and raises an error: ValueError: generator already executing. I think this is happens because the second evaluation calls the function make_real_env, which has already been called during the first evaluation.

@shantanuparab-tr I would appreciate it if there is any solution or comment on this issue.

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

3 participants