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

Controlling the fly legs using torque control #5

Open
Er1ckR0mo opened this issue May 23, 2024 · 8 comments
Open

Controlling the fly legs using torque control #5

Er1ckR0mo opened this issue May 23, 2024 · 8 comments
Labels
question Further information is requested

Comments

@Er1ckR0mo
Copy link

Hi! From your paper, I see the wings can be controlled by inputting torques. My question is, can I do the same with the leg joints?
Also, what units should the input torque be?
Thanks!

@vaxenburg
Copy link
Member

Yes of course, the fly model is readily reconfigurable and you can switch to torque actuators for legs as well.

You can do it either by directly editing the fly xml file (low-level, so might be painful), of do it programmatically using PyMJCF (recommended). Here is an example of how it's done for the dm_control rodent model. It would be slightly different for the fly model, but the procedure is similar.

The MuJoCo docs on actuators could also be helpful.

@vaxenburg vaxenburg added the question Further information is requested label May 24, 2024
@Er1ckR0mo
Copy link
Author

Thank you for your reply! May I ask two more doubts:
How do you select the components of the actuator, such as forcerange, etc.?

Also, how are the damping and stiffness values of the joint selected? Are these based on literature or trial and error?

Thanks!

@vaxenburg
Copy link
Member

Most of these things are pretty loose for now. The actuator parameters are mostly educated guesses. For example you can use some fly walking videos to estimate the leg velocity and/or acceleration and then roughly estimate the force ballpark. Trial and error also works:)

One choice of damping could be to use critical damping (for given actuator gain), you can try calculating it with a function like this.

Getting better estimates for some of these parameters could be an interesting project.

@Er1ckR0mo
Copy link
Author

Hi again!

Do you have an example where you control the wings of your fly model by using torque control?

Thanks in advance!

@vaxenburg
Copy link
Member

Sure, in fact we used nothing but torque control for the wings

@Er1ckR0mo
Copy link
Author

could you please refer me to it?

@Er1ckR0mo
Copy link
Author

Thanks! Going to check these.
I am interested in knowing how the torques are inputted to the actuators in mujoco and how these torque values are selected/updated during the task.

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

No branches or pull requests

2 participants