Updated PD Controller and included example Policy 17717 Iterations#15
Updated PD Controller and included example Policy 17717 Iterations#15haloted wants to merge 5 commits into
Conversation
|
|
||
| torque_B += fbtorque_B; /// sum of torque inputs | ||
|
|
||
| force_B(2) += mass_ * 9.81; /// Sum of thrust inputs |
There was a problem hiding this comment.
why do you add gravity? this should be done by raisim
There was a problem hiding this comment.
oh, the original implementation has this as action scaling. Since we already have it in a different place, you don't need it
|
|
||
| torque_B += fbtorque_B; /// sum of torque inputs | ||
|
|
||
| force_B(2) += mass_ * 9.81; /// Sum of thrust inputs |
There was a problem hiding this comment.
oh, the original implementation has this as action scaling. Since we already have it in a different place, you don't need it
|
Jemin this code needs to be debugged before you approve of the merge. Please check if it works well before merging. |
|
I had a look at my code again as I found there are errors in compiling now. I wasn't sure why there weren't errors previously. I found that rot_ as defined is a raisim object class. |


This updates the Environmental.hpp with PD controller. The policy is trained overnight and it greatly reduced the tracking error in the vertical axis.

I found the cause of the vertical tracking error could be due to the original code not including the mass of the quadrotor as sum to the Z-axis force vector.
Though there is still a little bit of horizontal translation error. If you have time, please suggest improvement and feedback to how to better optimise this.
Not sure whether it's to do with learning rate, a learning rate decay could be implemented later to see if it would help reduce the tracking error.
About the quadrotor_position_tracking.py, if it is merged please delete the code you don't need such as action2thrust function. I know there is the git cherry pick function but I have other priorities than learning how to use it.