Skip to content

Evanyl/screw-sorter-sw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screw-sorter-sw/sim/

Setup

To run blender simulation, need to install blender

Initial Environment Setup:

  1. Install conda
  2. Run conda env create --file environment.yml
  3. Activate environment using conda activate screw-sorter

Updating Environment Setup:

  1. Activate environment using conda activate screw-sorter
  2. Update environment using conda env update --file environment.yml --prune

Usage

Using scraper

  1. Run python sim/scripts/scraper.py --help to see all options

Using simulation

Example command to run to generate sim images blender side_profile_2.blend --background --python ./scripts/run_sim.py

screw-sorter-sw/ui/

Codebase for a fastener imaging station.

How to run the UI

Go to this directory

cd sw

Run the UI python script

./data_collection_backend.py

How to refresh the rclone token

We use rclone to copy our imaging tests to google drive. You can read more about it here. It uses a token to upload to drive that expires pretty often (like daily?)

Open command line (Ctrl + Alt + T on the Imaging Station) and type the following:

rclone config reconnect gdrive_more_storage:

This will appear:

Already have a token - refresh?
y) Yes (default)
n) No

Type "y" and press "enter". Then this will appear next:

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n>

Respond with "y" again.

Your web browser should launch and direct you to sign in. Login to [email protected], the credentials should already be saved in the browser.

After logging in, you'll see a scary screen saying "Google hasn't verified this app". Disregard that, the app was created by us to upload files to google drive. Click "advanced" -> "Go to rclone screw sorter (unsafe)".

Then click "Continue" and you should see a white screen with "Success!" at top.

If you return to your command line, you'll see the following:

2023/11/20 23:45:01 NOTICE: Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config.
2023/11/20 23:45:01 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=lZ7vYKchroHJGHz_3vuNNw
2023/11/20 23:45:01 NOTICE: Log in and authorize rclone for access
2023/11/20 23:45:01 NOTICE: Waiting for code...
2023/11/20 23:47:18 NOTICE: Got code
Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n>

Respond with "n".

You can verify the token works by typing into your command line.

rclone lsd gdrive_more_storage:2357\ Screw\ Sorter

It should list the top-level directories in our screw sorter folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •