Giter Club home page Giter Club logo

aerobenchvvpython's People

Contributors

hawkinsw avatar stanleybak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aerobenchvvpython's Issues

AttributeError: 'list' object has no attribute 'shape'

Thanks, Dr. Bak for publishing this great simulation and experimentation framework as open source so that the community can use it. I am attempting to generate some of the example videos/images and I am having some trouble. I have slimmed down the run_all.sh file and created a run_gcash.sh file whose contents are:

#!/bin/bash

time python3 run_GCAS_anim3d.py gcas.mp4
time python3 run_GCAS_anim3d.py gcas.gif

When I run these commands, I get this result:

$ ./run_gcas.sh 
saving result to 'gcas.mp4'
GCAS transition waiting -> roll at time 4.999999999999992
GCAS transition roll -> pull at time 6.233333333333321
GCAS transition pull -> standby at time 11.833333333333302
Simulation Completed in 0.35 seconds

Saving 'gcas.mp4' at 40.00 fps using ffmpeg with codec 'libx264'.
Frame: 0/451 - Index 0 frame 0/451
Traceback (most recent call last):
  File "/home/hawkinsw/dependable/AeroBenchVVPython/code/aerobench/visualize/anim3d.py", line 359, in make_anim
    anim_obj.save(filename, fps=fps, extra_args=extra_args)
  File "/home/hawkinsw/.local/lib/python3.8/site-packages/matplotlib/animation.py", line 1128, in save
    anim._init_draw()  # Clear the initial frame
  File "/home/hawkinsw/.local/lib/python3.8/site-packages/matplotlib/animation.py", line 1703, in _init_draw
    self._draw_frame(next(self.new_frame_seq()))
  File "/home/hawkinsw/.local/lib/python3.8/site-packages/matplotlib/animation.py", line 1726, in _draw_frame
    self._drawn_artists = self._func(framedata, *self._args)
  File "/home/hawkinsw/dependable/AeroBenchVVPython/code/aerobench/visualize/anim3d.py", line 325, in anim_func
    trail_line.set_3d_properties(pos_zs[start_index:frame])
  File "/home/hawkinsw/.local/lib/python3.8/site-packages/mpl_toolkits/mplot3d/art3d.py", line 143, in set_3d_properties
    zs = np.broadcast_to(zs, xs.shape)
AttributeError: 'list' object has no attribute 'shape'

I was just wondering if you ever saw anything like that and whether you could help me debug.

Thank you again for the implementation and its publication as OS.

Will

Source of the ACAS Xu ONNX Files

Dr. Bak,

I was wondering how you sourced the ONNX files for the ACAS Xu branch? Did you generate those files yourself? Did you get them from another source? Any information you could provide would be incredibly helpful!

Thank you!
Will

Cannot locate

In v1 there are checks in the pass/fail automaton that guarantee airspeed, alpha, beta, etc are within proper limits:

        @abc.abstractmethod
        def advance(self, t, x_f16, autopilot_state, xd, u, Nz, ps, Ny_r):
        '''advance the automaton state based on the current aircraft state'''

        airspeed = x_f16[0]
        self.check('airspeed', t, airspeed, self.flightLimits.vMin, self.flightLimits.vMax)

        alpha = rad2deg(x_f16[1])
        self.check('alpha', t, alpha, self.flightLimits.alphaMinDeg, self.flightLimits.alphaMaxDeg)

        beta = rad2deg(x_f16[2])
        self.check('beta', t, beta, -self.flightLimits.betaMaxDeg, self.flightLimits.betaMaxDeg)

        self.check('Nz', t, Nz, self.flightLimits.NzMin, self.flightLimits.NzMax)

        altitude = x_f16[11]
        self.check('altitude', t, altitude, self.flightLimits.altitudeMin, self.flightLimits.altitudeMax)

However, in v2, I can find only that Nz is checked

        def get_checked_u_ref(self, t, x_f16):
        '''
        for the current discrete state, get the reference inputs signals and check them against ctrl limits
        '''

        rv = np.array(self.get_u_ref(t, x_f16), dtype=float)

        assert rv.size % 4 == 0, "get_u_ref should return Nz, ps, Ny_r, throttle for each aircraft"

        for i in range(rv.size //4):
            Nz, _ps, _Ny_r, _throttle = rv[4*i:4*(i+1)]

            l, u = self.llc.ctrlLimits.NzMin, self.llc.ctrlLimits.NzMax
            assert l <= Nz <= u, f"autopilot commanded invalid Nz ({Nz}). Not in range [{l}, {u}]"

        return rv

I am obviously missing something, but would really appreciate you pointing out my misunderstanding. It seems like in v2 there is no explicit pass/fail automaton and it's all integrated. That would seem to render the different check_*.py files moot. Am I correct in saying that?

Thanks for your help!
Will

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.