Skip to content

Physical blockly - #129

Open
CorbinDS wants to merge 50 commits into
masterfrom
physical_blockly
Open

Physical blockly#129
CorbinDS wants to merge 50 commits into
masterfrom
physical_blockly

Conversation

@CorbinDS

Copy link
Copy Markdown
Collaborator

Physical Blockly. Master was first merged into the branch. I tested it and it seems good.

Feel free to test it with apriltags from: https://docs.cbteeple.com/robot/april-tags

Check the file basestation/piVision/tag_isns.json to make sure that the tag you test with actually has an instruction.

If running from Windows OS, the following must be done:
In order for the AprilTag detection library to function, basestation must be run from within an Anaconda terminal. Follow the install instructions here: https://github.com/ai4ce/pyAprilTag. Activate the conda environment ‘opencv_py37’ before running basestation. If an error is encountered regarding:
Line endings (something about ‘\r’’s): open run_BS.sh in notepad++, go to Edit>EOL>Unix
Command flask not found: remove the last line of run_BS.sh, and run the command ‘python -m flask run’ after the normal one.
You may need to specifically install things like bash in Anaconda if you encounter an error saying it does not exist.
As specified above, run basestation from anaconda environment. Run a virtual minibot from a bash prompt. Run “npm run webpack” in a separate bash prompt in order to observe frontend changes if editing .js files.

Features:
Physical Blockly Tab with two Apriltag detection modes, Camera Mode, and Real-Time Mode. Both of these modes use a camera and scan for any apriltags that have corresponding commands as specified in the tag_insns.json file. It converts these commands to python and to blockly blocks.

IMPORTANT We haven't tested the functionality on a real minibot, just the simulated minibot and our webcams.

Camera Mode can take in the four minibot movement commands as well as a repeat command as well as an end loop command. The main purpose of this mode would be to set up the code using apriltags then to export it to the coding tab to test / use the program.

Real-Time Mode can only take in the four minibot movement commands, and it immediately sends those commands to the minibot.

@CorbinDS CorbinDS added enhancement New feature or request javascript Pull requests that update Javascript code python Pull requests that update Python code labels May 23, 2022

@swathi-parthibha swathi-parthibha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge!

@Sanjana679 Sanjana679 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks fine; it ran on my computer

@emz1003 emz1003 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basestation doesn't run for me on this branch:
stops at
================= MINIBOT CLIENT GUI =================
=========== STARTING BASESTATION ===============

@kchiem12

Copy link
Copy Markdown
Contributor

Works when I put the line 'flask run' in run_BS.sh. Should test this to see if it works on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update Javascript code python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.