utiasDSL / safe-control-gym

PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and RL
https://www.dynsyslab.org/safe-robot-learning/
MIT License
636 stars 132 forks source link

Implementing a Custom Controller on Safe-Control-Gym / Gym-Pybullet Drones #170

Closed lakshmikanth-nageswar closed 3 weeks ago

lakshmikanth-nageswar commented 3 weeks ago

Hi, could anyone please clear these queries of mine:

Thanks in Advance.

Federico-PizarroBejarano commented 3 weeks ago

Hello @lakshmikanth-nageswar, thank you for your interest in our gym. I will answer your points briefly below. Let me know if you need more details.

lakshmikanth-nageswar commented 3 weeks ago

Hi, Thanks a lot for your response! It is a lot clearer now to implement.

I am excited to implement a Model-based controller that is capable of learning. Could you please tell me on code level how to implement my controller - structure of codebase for model-based controller aided by learning [Say training the controller offline with the params of PyBullet drone and later using it for visualization (or) training it with pose and other state feedback from Pybullet sim]?

I am excited to hear from you.

Federico-PizarroBejarano commented 3 weeks ago

No worries! I am not sure exactly how to help you with your current project. What I would do is take a look at our examples folder, especially our RL and MPC examples. If you wanted to make your own controller and own experiments, I would copy an existing controller from the controllers folder that is similar to what you are trying to do (for example, PPO for RL or MPC for model-based), modify it, then copy the experiments you want to do from the examples folder and modify them to run your controller. You can see how we train an RL controller in the examples/rl folder. You can visualize your experiments by passing gui: True in the YAML file of your experiments.

lakshmikanth-nageswar commented 3 weeks ago

Thanks a lot for clarification. I'll approach you further if facing any issues. Closing the issue for now.