Open haloted opened 5 years ago
Jemin this code needs to be debugged before you approve of the merge. Please check if it works well before merging. Sorry for the inconvenience but I haven't really got time to learn how to use Clion.
This is the policy run for 14256 iterations.
It only seems to be slightly better at 11000 iterations. Is there a way to rotate the camera angle to see if it actually is just below the red dot? There seems to be some translational error but it's hard to see if the camera angle cannot be panned or rotated.
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. To convert it to quaternion, there is a quaternion class inside the Ogre::Quaternion though there isn't a method inside raisimOgre so it may need to be added. This involves quite a significant change.
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.