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

Questions about applying the algorithm to other models #25

Open
TRYzero opened this issue Jan 30, 2024 · 21 comments
Open

Questions about applying the algorithm to other models #25

TRYzero opened this issue Jan 30, 2024 · 21 comments

Comments

@TRYzero
Copy link

TRYzero commented Jan 30, 2024

Hello,
I've been encountering some challenges while attempting to apply your algorithm to different bipedal robots. Specifically, I tested the algorithm on two robots with distinct configurations.

  1. On a bipedal robot with six joints per leg, the robot can walk, but it continuously straddles.
1.30.2.mp4
  1. On a bipedal robot with five joints per leg, the policy network still tries to straddle and fails to walk properly.
1.30.1.mp4

I'm wondering if these issues are related to how I'm adjusting the parameters. Could there be specific parameter settings or modifications needed for different robot structures? Any guidance or suggestions on how to optimize the algorithm for various joint configurations would be greatly appreciated.
Thank you for your time and assistance.

@Sujgaik2003
Copy link

How do you apply to other robot plz guide me

@TRYzero
Copy link
Author

TRYzero commented Apr 10, 2024

How do you apply to other robot plz guide me

I've made three main adjustments:

  1. Switched to my own MJCF model.
  2. Tuned the PD parameters.
  3. Modified the mirror loss function.

If all these aspects are fine, the program should now be usable with your own robot model.

@Sujgaik2003
Copy link

Sujgaik2003 commented Apr 10, 2024

Thanks for reply actually I want to apply it on nao robot so plz can u help me out . By adjusting the parameters for nao robot.

@Sujgaik2003
Copy link

@TRYzero can u provide me the above project link where can I see the code it will be great help 🙂.

@TRYzero
Copy link
Author

TRYzero commented Apr 13, 2024

@TRYzero can u provide me the above project link where can I see the code it will be great help 🙂.

Well, I'm not entirely sure which aspect you're confused about. Could you please describe your question in more detail? Are you unclear about the entire process?

  1. If your question concerns how to convert URDF files to XML files, you might want to search for MuJoCo-related tutorials.
  2. Once you have the XML file for the NAO robot, you can adjust your model using envs/jvrc/gen_xml.py. This script is designed to transform a complete robot model into one that is more suitable for training.
  3. Next, you might need to refer to envs/jvrc/jvrc_walk.py to write your own nao_walk.py. In this file, you may need to adjust the PD gains and the mirror symmetry settings. Of course, you will need to replace the imported XML path with your own.
  4. Another file you might need to adjust is envs/jvrc/robot.py, because the half_sitting_pose used for the JVRC may not be suitable for your robot.

@Sujgaik2003
Copy link

Hey I am done with step one by converting urdf to XML file not going ahead with 2,3,4 step as you mentioned can u guide me regarding the 4 step as u mentioned it could be a great help

@TRYzero
Copy link
Author

TRYzero commented Apr 15, 2024

Hey I am done with step one by converting urdf to XML file not going ahead with 2,3,4 step as you mentioned can u guide me regarding the 4 step as u mentioned it could be a great help

In the fourth step, I mentioned the "half_sitting_pose" as shown in the screenshot.
image
Well, this will not be the key factor.

@Sujgaik2003
Copy link

Sujgaik2003 commented Apr 15, 2024

Okhy
So there is no need to change in robot.py ? It can also use with nao robot

@TRYzero
Copy link
Author

TRYzero commented Apr 16, 2024

Okhy So there is no need to change in robot.py ? It can also use with nao robot

yep

@Sujgaik2003
Copy link

Sujgaik2003 commented Apr 18, 2024

@formoree
Copy link

@Sujgaik2003
Copy link

Still not yet !

@formoree
Copy link

Hello, I've been encountering some challenges while attempting to apply your algorithm to different bipedal robots. Specifically, I tested the algorithm on two robots with distinct configurations.

  1. On a bipedal robot with six joints per leg, the robot can walk, but it continuously straddles.

1.30.2.mp4
2. On a bipedal robot with five joints per leg, the policy network still tries to straddle and fails to walk properly.

1.30.1.mp4
I'm wondering if these issues are related to how I'm adjusting the parameters. Could there be specific parameter settings or modifications needed for different robot structures? Any guidance or suggestions on how to optimize the algorithm for various joint configurations would be greatly appreciated. Thank you for your time and assistance.

Have you ever solve this problem? I think the key factors may be the setting of pdgains, the transformation of the .xml file and reward setting. I have change the robot to OP3, and it is still hard for it to walk steadily.

@formoree
Copy link

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

@TRYzero
Copy link
Author

TRYzero commented Jul 17, 2024

Have you ever solve this problem? I think the key factors may be the setting of pdgains, the transformation of the .xml file and reward setting. I have change the robot to OP3, and it is still hard for it to walk steadily.

I solved this problem by introducing reference motions. Well, there shouldn't be any need for this. Did this issue also appear on your robot?

@formoree
Copy link

Have you ever solve this problem? I think the key factors may be the setting of pdgains, the transformation of the .xml file and reward setting. I have change the robot to OP3, and it is still hard for it to walk steadily.

I solved this problem by introducing reference motions. Well, there shouldn't be any need for this. Did this issue also appear on your robot?

20240717_114941.mp4

I don't know why my robot keeps trembling and can't walk normally like humans, I don't know if it's because that i add a collision geom in .xml file.

@Sujgaik2003
Copy link

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Hey I think that would be the issue can u plz provide any reference doc to which by referring I can download the python pack sites of mujoco

@formoree
Copy link

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Hey I think that would be the issue can u plz provide any reference doc to which by referring I can download the python pack sites of mujoco

I have not met this problem. I just use "pip install" comand to install the target version mujoco

@Sujgaik2003
Copy link

Sujgaik2003 commented Jul 17, 2024

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Hey I think that would be the issue can u plz provide any reference doc to which by referring I can download the python pack sites of mujoco

I have not met this problem. I just use "pip install" comand to install the target version mujoco

Yeah I have tried the same put still not available to resolve the error it still saying add mujoco path to environment i have tried all way but not able to solve the error

@formoree
Copy link

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Still not yet !

I have read through your bugs, i think the problem is the mujoco library. Maybe you don't download the python packsites of mujoco. To be clear that the problem has nothing to do with your code.

Hey I think that would be the issue can u plz provide any reference doc to which by referring I can download the python pack sites of mujoco

I have not met this problem. I just use "pip install" comand to install the target version mujoco

Yeah I have tried the same put still not available to resolve the error it still saying add mujoco path to environment i have tried all way but not able to solve the error

I have asked Claude the problem,it gives the following answer:
It seems like you are encountering an issue with the MuJoCo library not being properly set up in your system's PATH environment variable. This is a common problem when working with MuJoCo, which is a proprietary physics simulation engine used in robotics and machine learning.

To resolve this issue, you need to add the MuJoCo library directory to your system's PATH environment variable. The specific steps may vary depending on your operating system, but here's a general guide:

  1. Locate the MuJoCo installation directory. It's typically in your user's home directory, such as C:\Users\YourUsername\.mujoco\mujoco210 on Windows or ~/.mujoco/mujoco210 on macOS/Linux.

  2. Open the appropriate system environment variable editor:

    • On Windows: Open the Start menu, search for "Environment Variables", and select "Edit the system environment variables".
    • On macOS/Linux: Open a terminal and run the command nano ~/.bashrc (or the appropriate editor for your shell).
  3. In the environment variable editor, find the "Path" or "PATH" variable and add the MuJoCo library directory to it. For example, on Windows, the entry might look like this:

    C:\Users\YourUsername\.mujoco\mujoco210\bin;%PATH%
    

    On macOS/Linux, it might look like this:

    ~/.mujoco/mujoco210/bin:$PATH
    
  4. Save the changes and close the environment variable editor.

  5. Restart your system or terminal session to ensure the new PATH is applied.

After completing these steps, the MuJoCo library should be available in your system's PATH, and you should be able to run your code without the "Please add mujoco library to your PATH" exception.

If you are still experiencing issues, make sure that you have properly installed the MuJoCo license and that the library files are present in the correct directory. You may also need to check your Python environment and ensure that the MuJoCo Python bindings are correctly installed and accessible.

@TRYzero
Copy link
Author

TRYzero commented Jul 29, 2024

Have you ever solve this problem? I think the key factors may be the setting of pdgains, the transformation of the .xml file and reward setting. I have change the robot to OP3, and it is still hard for it to walk steadily.

I solved this problem by introducing reference motions. Well, there shouldn't be any need for this. Did this issue also appear on your robot?

20240717_114941.mp4
I don't know why my robot keeps trembling and can't walk normally like humans, I don't know if it's because that i add a collision geom in .xml file.

Perhaps you can introduce foot trajectory reward terms to solve the problem. For example, have your foot's height track a curve that you design.

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