Sohojoe / ActiveRagdollStyleTransfer

Research into locomotion style transfer with Active Ragdolls (using MarathonEnvs +ml_agents)
Apache License 2.0
143 stars 21 forks source link

question about creating torque #18

Closed Hayleymol closed 3 years ago

Hayleymol commented 3 years ago

Hello, thanks for the great repo to learn with. I just came up with one question while reading your repo.

I understood that you didn't use PD control like the original DeepMimic paper by reading the other question. It seems like the learning agent's joint angle is directly targeted like; muscle.TargetNormalizedRotationX = vectorAction[i++]

From what I understood, this only tells the rotation of the joint to follow. My question is, how did you manage to create the torque to be applied to that joint? I have seen UpdateMotor() function and wonder whether this is the related function?

Sohojoe commented 3 years ago

hi @Hayleymol - sorry I didn't see this before...

In this work, I do not use a PD controller. The motor is set in the UpdateMotor() function.

Internally, the joint figures out what force to apply in order to get to that target rotation speed.

In later work we switched to the ArticulationBody, which has a PD controller built-in (so one can specify the desired local angle per joint)

Hayleymol commented 3 years ago

Thank you for your answer! I will look into the switched ArticulationBody as well.