예제 #1
0
from chap2.mav_viewer import mav_viewer
from chap3.data_viewer import data_viewer
from chap7.mav_dynamics import mav_dynamics
from chap4.wind_simulation import wind_simulation
from chap6.autopilot import autopilot
from chap8.observer import observer
from tools.signals import signals

# initialize the visualization
mav_view = mav_viewer()  # initialize the mav viewer
data_view = data_viewer()  # initialize view of data plots

# initialize elements of the architecture
wind = wind_simulation(SIM.ts_simulation)
mav = mav_dynamics(SIM.ts_simulation)
ctrl = autopilot(SIM.ts_simulation)
obsv = observer(SIM.ts_simulation)

# autopilot commands
from message_types.msg_autopilot import msg_autopilot
commands = msg_autopilot()
Va_command = signals(dc_offset=25.0,
                     amplitude=3.0,
                     start_time=2.0,
                     frequency=0.01)
h_command = signals(dc_offset=100.0,
                    amplitude=10.0,
                    start_time=0.,
                    frequency=0.02)
chi_command = signals(dc_offset=np.radians(180),amplitude=np.radians(45), \
예제 #2
0
import parameters.aerosonde_parameters as P

from chap3.data_viewer import data_viewer
from chap4.wind_simulation import wind_simulation
from chap6.autopilot import autopilot
from chap7.mav_dynamics import mav_dynamics
from chap8.observer_ekf import observer
from chap10.path_follower import path_follower
from chap11.path_manager import path_manager
from chap12.world_viewer import world_viewer
from project.voronoi import Voronoi_Planner
from message_types.msg_map import msg_map

# initialize elements of the architecture
wind = wind_simulation(SIM.ts_simulation)
mav = mav_dynamics(SIM.ts_simulation, [P.pn0_corner, P.pe0_corner, P.pd0])
ctrl = autopilot(SIM.ts_simulation)
obsv = observer(SIM.ts_simulation, [P.pn0_corner, P.pe0_corner, P.pd0])
path_follow = path_follower()
path_manage = path_manager()
map = msg_map(PLAN)
voronoi = Voronoi_Planner(map)

# -------path planner - ----
waypoints = voronoi.plan()
waypoints.ned = waypoints.ned[:, :waypoints.num_waypoints]

# initialize the visualization
VIDEO = False  # True==write video, False==don't write video
world_view = world_viewer(map, voronoi)  # initialize the viewer
data_view = data_viewer()  # initialize view of data plots
from chap7.mav_dynamics import mav_dynamics
from tools.signals import signals

# initialize the visualization
VIDEO = False  # True==write video, False==don't write video
mav_view = mav_viewer()  # initialize the mav viewer
data_view = data_viewer()  # initialize view of data plots
if VIDEO == True:
    from chap2.video_writer import video_writer
    video = video_writer(video_name="chap7_video.avi",
                         bounding_box=(0, 0, 1000, 1000),
                         output_rate=SIM.ts_video)

# initialize elements of the architecture
wind = wind_simulation(SIM.ts_simulation)
mav = mav_dynamics(SIM.ts_simulation, [P.pn0, P.pe0, P.pd0])
ctrl = autopilot(SIM.ts_simulation)

# autopilot commands
from message_types.msg_autopilot import msg_autopilot
commands = msg_autopilot()
Va_command = signals(dc_offset=25.0,
                     amplitude=3.0,
                     start_time=2.0,
                     frequency=0.01)
h_command = signals(dc_offset=100.0,
                    amplitude=10.0,
                    start_time=0.0,
                    frequency=0.02)
chi_command = signals(dc_offset=np.radians(180),
                      amplitude=np.radians(45),