-
Notifications
You must be signed in to change notification settings - Fork 1
Plan
Switchblade edited this page Jan 16, 2025
·
6 revisions
16-01-2025 19:37:53 hrs as I'm writing this.
First,
- we downloaded ISAACSIM.
- We cloned and configured PX4-AutoPilot.
- We connected both through Pegasus simulator using this code as base spawn_isaacsim_withcode.py.
- Then controlled the drone movement through QGroundControl while PX4 make and Issac sim was running, turned out to be successful.
Now, I want to make a Reinforcement learning model to steer the drone to achieve tasks like hovering, going in a trajectory,etc.
For this, I need to :
- Make my own custom backend controller instead of PX4, QGroundControl and Mavlink.
- Remove PX4,QGC from the equation, leaving only isaac sim and rl model to access through code only.
- Use this as boiler plate code.
- Still use pegasus to communicate between Isaac sim and the RL model.
- This custom backend will receive current state of vehicle and all of it's sensors, finds out the control values to give to the rotors of the drone and sends them to the drone's motors.
- Plan is to include the RL model in the middle of this control backend to help it steer the drone.
To do this, I follow this guide in Pegasus documentation to build my backend. Will update when I finish.
From what I read here, after writing the custom backend , we need to just import the multirotorconfig() there and write it in the main simulation file like this :
config_multirotor1 = MultirotorConfig()
config_multirotor1.backends = [NonlinearController(
trajectory_file=self.curr_dir + "/trajectories/pitch_relay_90_deg_2.csv",
results_file=self.curr_dir + "/results/single_statistics.npz",
Ki=[0.5, 0.5, 0.5],
Kr=[2.0, 2.0, 2.0]
)]
where trajectory_file, results_file, Ki and Kr are functions defined in the controller file.