-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
27 lines (22 loc) · 978 Bytes
/
Copy pathconfig.py
File metadata and controls
27 lines (22 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Initial settings and configuration
import pybullet as p
import time
import pybullet_data
class simSetup:
def initSettings(self):
# Initalization Code
physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
p.configureDebugVisualizer(p.COV_ENABLE_GUI, 0) # Removes the GUI text boxes
# physicsClient = p.connect(p.DIRECT)
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-9.81)
self.planeId = p.loadURDF("plane.urdf")
# Load MIST-UAV
self.robotStartPos = [0,0,1]
self.robotStartOrientation = p.getQuaternionFromEuler([0,0,0])
# robotId = p.loadURDF("MIST.urdf",robotStartPos, robotStartOrientation)
self.robotId = p.loadURDF("MIST.urdf",self.robotStartPos, self.robotStartOrientation)
# print(robotId)
self.hingeIds = [0, 1, 2]
self.ctrlSurfIds = [9, 7, 5, 3]
self.propIds = [10, 8, 6, 4]