ivapylibs / Surveillance

The surveillance system for the SuperviseIt project
0 stars 1 forks source link

test scripts fail #1

Closed pv33 closed 3 years ago

pv33 commented 3 years ago

The test scripts are failing when run from the command line. Seems like you are relying on the IDE to manage the environment for you. That's a no-no. Error given is:

Traceback (most recent call last): File "./height01.py", line 22, in from utils.height_estimate import HeightEstimator ModuleNotFoundError: No module named 'utils'

pv33 commented 3 years ago

Also, this is the wrong place to be putting things. The height remapping code needs to ultimately needs to be put into a camera class that is independent of ROS. I mentioned this at least once, most likely twice. Your existing code is fine to keep in the weird crusty file that does it all for ROS, but new things need to be put into the proper place.

Fine to be here for now until the proper path structure is established. Please work on correcting the above error.

yiyeChen commented 3 years ago

@pv33

The bug is fixed. No I don't use IDE. I use an editor and run the code in the command line. The bug is caused by my incorrect path setting that made the code can only be run from the root directory. Anyway it is fixed now.

Yeah I agree that code should eventually be put somewhere else, that it's why I put a TODO line about this at the beginning of the height estimation class file. I opened a new issue #3 to remind me of that.

With the new issue opened, I think you can try the test script again and close this issue?