utiasDSL / gym-pybullet-drones

PyBullet Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control
https://utiasDSL.github.io/gym-pybullet-drones/
MIT License
1.23k stars 357 forks source link

How to control drone using my desired roll pitch yaw? #119

Open Jay1470 opened 2 years ago

Jay1470 commented 2 years ago

Hi @JacopoPan , I am currently trying to implement visual servoing using your simulator. My application requires that I control the quadrotor using the roll pitch yaw obtained from my equations. Can you please tell me how can I control the quadrotor using my roll, pitch yaw commands.

JacopoPan commented 2 years ago

Roll pitch yaw or roll pitch yaw rates? You'll need to write your own controller for that OR try to use a Python wrapper (like pycffirmware of the Crazyflie firmware (that has a roll pitch yaw thrust interface in cmdVel)

DS3a commented 1 year ago

Hi @JacopoPan , I am unable to find the control scheme you mentioned in pycffirmware (roll, pitch, yawrate, thrust). attitude_pid has roll, pitch, yaw, rollrate, pitchrate, yawrate. I don't want to control the rollrate, and pitchrate, and the yaw. And, I don't think setting them to zero will work. Moreover there is no mention of thrust.

I also found controller_pid, this has roll, pitch, yaw and thrust. everything works, except for yawrate. Is there anything I am missing?