-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
Hello!
I have built a Pixhawk quadcopter with PX4 installed on it and I wish to create a virtual copy of it.
I have installed dronekit and dronekit-sitl on my Python3 (Ubuntu 20.04).
The PX4 Toolchain has been installed and it works as expected. When I use the terminal to launch a simulation using the command make px4_sitl_default jmavsim the virtual drone is created.
However, I want to do this through a python script. Is there a way to mimic the following terminal command in python using dronekit_sitl package?
I ran the following code but it creates an APM Copter V3.3.
connection_string = '127.0.0.1:14540'
try:
#### connect to px4 drone if simulation already triggered
vehicle = connect(connection_string, wait_ready=True)
except:
#### trigger new px4 sitl jmavsim simulation
import dronekit_sitl
sitl = dronekit_sitl.start_default()
vehicle = connect(sitl.connection_string(), wait_ready=True)
How can I give it the input to use px4_sitl_default and jmavsim instead of Arducopter?
Thank you for your time :)
Metadata
Metadata
Assignees
Labels
No labels