Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create WebSocket for Webcam Interface #9

Merged
merged 13 commits into from
Nov 9, 2023
Merged

Create WebSocket for Webcam Interface #9

merged 13 commits into from
Nov 9, 2023

Conversation

AnimeAllstar
Copy link
Member

@AnimeAllstar AnimeAllstar commented Nov 4, 2023

In this PR, I updated the webcam interface code to create a WebSocket and send encoded frames over the connection to a client.

I did this using WebSocket++ aka websocketpp.

WebSocket++ depends on boost, hence, you will need both of them available on your system for successful execution.

Please update WEBSOCKETPP_DIR and BOOST_DIR to their directory on your system.

Since I installed them using homebrew, the paths are as follows (these may be different from your system):

WEBSOCKETPP_DIR := /opt/homebrew/opt/websocketpp/include
BOOST_DIR := /opt/homebrew/opt/boost/include

In addition to this, I downgraded to C++17. We had decided to use C++20, but when developing, I found that a lot of dependencies are not updated for C++20 and cause issues while compiling. C++17 has a lot more support and tbh, I doubt we are going to be using C++20-exclusive features in our code.

I also added a build-and-test workflow to build and test our code using a GitHub Action. It runs whenever a PR to main updates.

To run the WebSocket:

make
./navi

closes #5
closes #10

@CihanBosnali CihanBosnali merged commit 2fb259f into main Nov 9, 2023
2 checks passed
@CihanBosnali CihanBosnali deleted the websocket-asad branch November 9, 2023 03:40
CihanBosnali added a commit that referenced this pull request Jan 10, 2024
* Create WebSocket for Webcam Interface (#9)

* Added websocket prototype using websocket++

* Update CXXFLAGS to be more specific

* Update BUILD_GUIDE dependencies

Added 'WebSocket++' and 'boost' to the list of additional dependencies in BUILD_GUIDE.md.

* Remove header files

* Add variables for Websocketpp and Boost libraries

* Update path for Websocketpp and Boost

* Update build guide

* Prevent server from crashing when the client abruptly closes the connection

* Update docs

* Remove std::

* Downgrade to c++17

* Add Build and Test GitHub Action

* Rename workflow

* separated the webcam module into web and webcam modules (#12)

* Webcam Plant Detection (#13)

* changes for webCam

* Added hpp file, minor style fixes, deleted output files

---------
Co-authored-by: emilysxng
Co-authored-by: CihanBosnali <[email protected]>

---------

Co-authored-by: Asad Dhorajiwala <[email protected]>
Co-authored-by: Alfredo-del-Rayo <[email protected]>
Co-authored-by: droy4405 <[email protected]>
Tortus-exe added a commit that referenced this pull request Jan 21, 2024
* Merge main (#14)

* Create WebSocket for Webcam Interface (#9)

* Added websocket prototype using websocket++

* Update CXXFLAGS to be more specific

* Update BUILD_GUIDE dependencies

Added 'WebSocket++' and 'boost' to the list of additional dependencies in BUILD_GUIDE.md.

* Remove header files

* Add variables for Websocketpp and Boost libraries

* Update path for Websocketpp and Boost

* Update build guide

* Prevent server from crashing when the client abruptly closes the connection

* Update docs

* Remove std::

* Downgrade to c++17

* Add Build and Test GitHub Action

* Rename workflow

* separated the webcam module into web and webcam modules (#12)

* Webcam Plant Detection (#13)

* changes for webCam

* Added hpp file, minor style fixes, deleted output files

---------
Co-authored-by: emilysxng
Co-authored-by: CihanBosnali <[email protected]>

---------

Co-authored-by: Asad Dhorajiwala <[email protected]>
Co-authored-by: Alfredo-del-Rayo <[email protected]>
Co-authored-by: droy4405 <[email protected]>

* Merge changes from main, and clean up

* add two dependencies of opencv4

* remove useless make.txt file containing a piped output of a build

---------

Co-authored-by: Asad Dhorajiwala <[email protected]>
Co-authored-by: Alfredo-del-Rayo <[email protected]>
Co-authored-by: droy4405 <[email protected]>
Co-authored-by: Tortus-exe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GitHub Action to Build and Test project C++ Websocket Connection to Server
3 participants