Ensure you have the following prerequisites installed on your system:
- Git
- VCS Tool
- ROS2 & Colcon
The project requires the following dependencies to be installed and running on your local machine:
- InfluxDB
- Zenoh
- Zenoh ROS2DDS
- ChirpStack (LoRaWAN Network Server)
- Install:
curl -fsSL https://repos.influxdata.com/influxdata-archive_compat.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/influxdata.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
sudo apt update
sudo apt install influxdb=1.8.*
sudo systemctl enable influxdb
sudo systemctl start influxdb
sudo ufw allow 8086/tcp
sudo chown -R $USER:$USER /var/lib/influxdb
sudo chown -R influxdb:influxdb /var/lib/influxdb
influxd
Click the link to learn how to install and run Zenoh. Run Zenoh before starting any application.
Click the link to learn how to install and run Chirpstack with gateway. Run Chirpstack before starting any application.
- Download repositories:
git clone [email protected]:wise-vision/wisevision.proj.git && cd wisevision.proj
vcs import --recursive < project.repos
- Install dependencies:
cd wisevision.proj
./install_depends.sh
- Build:
Export variables to be able to load built shared libraries and include headers. It is recommended to put those variables inside .bashrc file.
export GRPC_INSTALL_DIR=$HOME/grpc_install_dir
export PATH=$GRPC_INSTALL_DIR/bin:$PATH
export LD_LIBRARY_PATH=$GRPC_INSTALL_DIR/lib:$LD_LIBRARY_PATH
Build:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
The black box requires a config.json
file. The only required field is zenoh_url
, which should point to the Zenoh server’s URL.
- Copy
exmaple_config.json
in.proj
directory:
cp config_example.json config.json
- Set environment variables:
export DB_ADDRESS=localhost
export DB_PORT=8086
- Run:
source install/setup.bash
ros2 run wisevision_data_black_box black_box
- Start Chirpstack in another terminal and open http://localhost:8080. Log in with admin/admin.
- Set environment variables.
- Create API Key and paste into
my_new_token
in command bellow and run this command:export CHIRPSTACK_API_KEY=<my_new_token>
- On Chirpstack UI add aplication.
- Copy
aplication id
and paste intomy_new_application_id
in command bellow and run this command:export APPLICATION_ID=<my_new_application_id>
- Run.
source install/setup.bash
ros2 run wisevision_lorawan_bridge lorawan_bridge --ros-args --param application_id:=$APPLICATION_ID --param use_only_standard:=false
- Run:
source install/setup.bash
ros2 run wisevision_action_executor automatic_action_service
- Run:
source intsall/setup.bash
ros2 run wisevision_gps_tools gps_device_manager_node
- Run (set use_email_notifier:=t[rue or false]-p use_firebase_notifier:=[true or false]):
source intsall/setup.bash
ros2 run wisevision_notification_manager notifications_handler --ros-args -p use_email_notifier:=true-p use_firebase_notifier:=false
- Install requirments and run server.
source intsall/setup.bash
cd src/wisevision_dashboard/app/server
pip3 install --no-cache-dir -r requirements.txt
cd ../..
exec gunicorn -k gthread -w 1 --threads 4 -b 0.0.0.0:5000 app.server.run:app"
- Beofre run frontend provied addres to backend server by copy file .
.env_example
into.env
:
cp src/wisevision_dashboard/app/client/.env_example src/wisevision_dashboard/app/client/.env
Note
Default addres is set to http://localhost:5000
, in any case to change it in .env
file to backend server addres.
- Install dependencies and run frontend.
cd src/wisevision_dashboard/app/client
npm install
npm start
- In browser go to address
localhost:5000
to see dashboard.