-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
60 lines (53 loc) · 2.01 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
set dotenv-load # to read ROBOT_NAMESPACE from .env file
[private]
default:
@just --list
[private]
check-husarion-webui:
#!/bin/bash
if ! command -v snap &> /dev/null; then
echo "Snap is not installed. Please install Snap first and try again."
echo "sudo apt install snapd"
exit 1
fi
if ! snap list husarion-webui &> /dev/null; then
echo "husarion-webui is not installed."
read -p "Do you want to install husarion-webui? (y/n): " choice
case "$choice" in
y|Y )
sudo snap install husarion-webui --channel=humble
;;
n|N )
echo "Installation aborted."
exit 0
;;
* )
echo "Invalid input. Please respond with 'y' or 'n'."
exit 1
;;
esac
fi
# Start navigation on User Computer inside Husarion UGV
start-hardware:
#!/bin/bash
docker compose -f docker/compose.hardware.yaml down
docker compose -f docker/compose.hardware.yaml pull
docker compose -f docker/compose.hardware.yaml up
# Start Gazebo simulator with navigation stack
start-simulation:
#!/bin/bash
xhost +local:docker
docker compose -f docker/compose.simulation.yaml down
docker compose -f docker/compose.simulation.yaml pull
docker compose -f docker/compose.simulation.yaml up
# Configure and run Husarion WebUI
start-visualization: check-husarion-webui
#!/bin/bash
sudo cp foxglove-layout.json /var/snap/husarion-webui/common/foxglove-husarion-ugv-navigation.json
sudo snap set husarion-webui webui.layout=husarion-ugv-navigation
sudo snap set husarion-webui ros.namespace=panther
sudo snap set husarion-webui ros.transport=rmw_cyclonedds_cpp
sudo husarion-webui.start
local_ip=$(hostname -I | awk '{print $1}')
hostname=$(hostname)
echo "Open a web browser and go to http://$local_ip:8080/ui or http://$hostname:8080/ui if your device is connected to the same Husarnet network."