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

Help for tuning parameters with different robot #28

Open
IreFri opened this issue Jul 5, 2024 · 6 comments
Open

Help for tuning parameters with different robot #28

IreFri opened this issue Jul 5, 2024 · 6 comments

Comments

@IreFri
Copy link

IreFri commented Jul 5, 2024

Hello,
I would like to use baseline walking controller for the simulation environment in mujoco with NAO robot.
I created the mujoco description of NAO and I am trying to tune the parameters in the configuration file. It seems much difficult for me to understand how to tune them in order to have the robot standing and walking.
Do you have some advice or some guidance for helping me with this?

Thank you very much in advance

@mmurooka
Copy link
Member

mmurooka commented Jul 6, 2024

I have prepared the following document as tips for introducing BWC to new robots. This tips section is based on problems encountered when applying BWC to robots outside of JRL.
https://www.dropbox.com/scl/fi/vpn4hvbh1v037aubm4jjo/BaselineWalkingController-Tips.docx?rlkey=4t7fvb45tmvmlb23awb3ke5eo&st=fryrxj6w&dl=0

If it is a general mc_mujoco issue, please ask/discuss in that repository.

@IreFri
Copy link
Author

IreFri commented Jul 10, 2024

Thank you, I followed the tips section you send me.
I still have difficulties in making the robot walk. The robot is still felling down in Mujoco. In rViz, it look like there is a kind of double contact during the walking (I attach the videos of Mujoco and rViz).
Watching the plots, there is a big difference between the force from the foot sensors and the target wrench for both feet.
Do you think I wrong in setting some parameters?

https://github.com/isri-aist/BaselineWalkingController/assets/63580685/8faa6535-6739-4b02-80a5-4b0971eee1e5
https://github.com/isri-aist/BaselineWalkingController/assets/63580685/bdf03517-4643-4efc-abdb-b06b1221026e

right_force
left_force

@mmurooka
Copy link
Member

mmurooka commented Jul 10, 2024

Watching the plots, there is a big difference between the force from the foot sensors and the target wrench for both feet. Do you think I wrong in setting some parameters?

It is possible that the mass of the robot model assumed by the controller differs from the mass of the robot in reality (or simulation). For MuJoCo, make sure that the mass of the URDF model and the MJCF model match.

In the video, the stride length is too large relative to the length of the robot's legs. It is recommended to start with a small stride. Also, since NAO has large soles, it would be a good idea to increase the footstepDuration of YAML and try a static gait.

@IreFri
Copy link
Author

IreFri commented Jul 11, 2024

Thank you. The stride length was too big. Increasing the spring angular parameters in single and double support made the robot walk in mujoco without falling. But for the rViz problem, I still have the behavior: the feet are going down kind of inside the ground, like if the ground is compliant. I tried to change linear spring along z, but changing this parameter nothing changed.
The force from the feet sensors and the target wrench is still very different. The mass of XML and URDF are the same. I tried to add 2 kilos in the XML just for trial and I observed that the force from sensors does not change change as I expected. I attach videos:
right_force

https://github.com/isri-aist/BaselineWalkingController/assets/63580685/d29017b7-674f-40a7-9146-b31c51f7d3bc
https://github.com/isri-aist/BaselineWalkingController/assets/63580685/1e9e374b-b0cf-41fc-a9f2-204fd966a866

@IreFri
Copy link
Author

IreFri commented Jul 11, 2024

Because the robot's weight is around 5.18 Kg, I think the force sensors are giving the correct force, but the target wrench gives a value significantly higher. From what depend the target wrench value? From where comes from?
I attach the position of the foot along z axis. The robot lift twice the foot during each step.
posez

@mmurooka
Copy link
Member

mmurooka commented Jul 14, 2024

But for the rViz problem, I still have the behavior: the feet are going down kind of inside the ground, like if the ground is compliant. I tried to change linear spring along z, but changing this parameter nothing changed.

This is due to the fact that the foot damping control subtly controls the foot height and orientation to maintain balance. If the robot does not fall over in simulations or in the real world, this should not be a problem.

Because the robot's weight is around 5.18 Kg, I think the force sensors are giving the correct force, but the target wrench gives a value significantly higher. From what depend the target wrench value? From where comes from?

There was a constraint that each ridge of the friction pyramid should exert a contact force of at least 3N. While this has the advantage of stabilizing foot contact for a life-size heavy robot, it was not an appropriate parameter for a lightweight robot such as NAO. Since there are four vertices on each foot and four ridges in the pyramid of each vertex, there is a lower contact force constraint of 344=48N, which roughly matches the result of the graph.

Try replacing the following line

ridgeForceMinMax: [3, 1000] # [N]

with the following

    ridgeForceMinMax: [0.3, 1000] # [N]

Or you can leave BaselineWalkingController/etc/BaselineWalkingController.in.yaml as is and add the following to the BWC configuration file for the robot (I prefer this). If there is already a CentroidalManager: section, merge it there.

CentroidalManager:
  wrenchDistConfig:
    ridgeForceMinMax: [0.3, 1000] # [N]

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