Added multi mav demo script. Enhanced existing trajectories.

This commit is contained in:
spencerfolk
2024-11-26 13:44:28 -05:00
parent 9339485311
commit 12c5ff4837
3 changed files with 188 additions and 5 deletions

View File

@@ -6,12 +6,14 @@ class HoverTraj(object):
By modifying the initial condition, you can create step response
experiments.
"""
def __init__(self):
def __init__(self, x0=np.array([0, 0, 0])):
"""
This is the constructor for the Trajectory object. A fresh trajectory
object will be constructed before each mission.
"""
self.x0 = x0
def update(self, t):
"""
Given the present time, return the desired flat output and derivatives.
@@ -28,7 +30,7 @@ class HoverTraj(object):
yaw, yaw angle, rad
yaw_dot, yaw rate, rad/s
"""
x = np.zeros((3,))
x = self.x0
x_dot = np.zeros((3,))
x_ddot = np.zeros((3,))
x_dddot = np.zeros((3,))