-
Notifications
You must be signed in to change notification settings - Fork 18
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
Setup TX2 initialization #356
Changes from all commits
9868652
c420dee
d2a2869
c677ecd
650c248
6e5b8b8
8d9e7c0
de4ce5f
ec59029
8df768b
9e58f8b
ce944a5
07bc69f
ae66953
4ec7df1
f2b9ca3
31c7647
2287ff0
97a9c36
05cfc43
384b32d
d0c6e65
17a47ef
ae60528
8a71c22
de4641b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# Script which setups the Space Concordia Robotics Software team's OBC. | ||
|
||
REPO="/home/$USER/Programming/robotics-prototype" | ||
|
||
FINAL_MESSAGE="The script will now exit, ensure that ros is install correctly and that | ||
all of the rospackages are present. Reboot to run systemd services." | ||
|
||
#install prereqs | ||
sudo apt update -y | ||
sudo apt install openssh-server -y | ||
sudo ufw allow ssh | ||
|
||
# Setup systemd services | ||
cd $REPO/robot/rover | ||
sudo cp systemd/config-ethernet.service /etc/systemd/system/config-ethernet.service | ||
sudo cp systemd/ros-rover-start.service /etc/systemd/system/ros-rover-start.service | ||
sudo systemctl enable config-ethernet.service | ||
sudo systemctl enable ros-rover-start.service | ||
|
||
# Setup ethernet and emailer service scripts | ||
cd $REPO/robot/util | ||
sudo cp configEthernet/runConfigEthernet.sh /usr/bin/runConfigEthernet.sh | ||
cd $REPO/robot/util/configEthernet && bash synchConfigEthernet.sh | ||
|
||
# Exit | ||
echo "$FINAL_MESSAGE" | ||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env bash | ||
bash /home/odroid/configEthernet/configEthernet.sh > /home/odroid/configEthernet/configEthernet.log | ||
bash /home/nvidia/configEthernet/configEthernet.sh > /home/nvidia/configEthernet/configEthernet.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ const EMAILS_FILE_NAME = 'emails.txt' | |
// fallback to default emails if there's and issue with the emails file | ||
const DEFAULT_EMAILS = [ | ||
'[email protected]', | ||
'[email protected]' | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]' | ||
] | ||
|
||
let ourIP | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env bash | ||
HOME="/home/odroid" | ||
HOME="/home/nvidia" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is it sometimes $USER sometimes nvidia There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this related to what you put in the description? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are apparently issues with using $USER when running it as a systemd service. I'll try to changing it back to see if I can get to work tho There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also it isn't related to what I put in the description. The description refers to some weird issue with connecting to ROS over a vpn server which has a workaround. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The systemd service doesn't work if $USER is used anywhere because the service has to run under root for some reason. I haven't find a way to fix this yet |
||
REPO_HOME="$HOME/Programming/robotics-prototype" | ||
ETHERNET_CONFIG_STATUS="$HOME/configEthernet/status_done" | ||
#CATKIN_WS_SETUP="$HOME/catkin_ws/devel/setup.bash" # catkin ws only for isolated prototyping | ||
OPT_KINETIC_SETUP="/opt/ros/kinetic/setup.bash" # ros system default workspace | ||
OPT_MELODIC_SETUP="/opt/ros/melodic/setup.bash" # ros system default workspace | ||
ROS_PACKAGES_SETUP="$REPO_HOME/robot/rospackages/devel/setup.bash" | ||
ROSLAUNCH_FILE="$REPO_HOME/robot/util/rosRoverStart/rover.launch" | ||
# wait for connection to configure itself via config-ethernet.service | ||
|
@@ -21,4 +21,4 @@ source "$REPO_HOME/venv/bin/activate" | |
python3 "$REPO_HOME/setup.py" develop | ||
|
||
# source primary catkin_ws setup bash script and execute one launch script to rule them all | ||
source $OPT_KINETIC_SETUP && source $ROS_PACKAGES_SETUP && roslaunch $ROSLAUNCH_FILE | ||
source $OPT_MELODIC_SETUP && source $ROS_PACKAGES_SETUP && roslaunch $ROSLAUNCH_FILE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
ROS_ROVER_START_DIR="/home/odroid/Programming/robotics-prototype/robot/util/rosRoverStart" | ||
ROS_ROVER_START_DIR="/home/nvidia/Programming/robotics-prototype/robot/util/rosRoverStart" | ||
ROS_ROVER_START_SH="$ROS_ROVER_START_DIR/rosRoverStart.sh" | ||
ROS_ROVER_START_LOG="$ROS_ROVER_START_DIR/rosRoverStart.log" | ||
bash $ROS_ROVER_START_SH > $ROS_ROVER_START_LOG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you be using $USER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't work cause the systemd service has to run under root for some reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thing is, you can change the service to run as non-root but then certain processes later in the pipeline will fail and need to be worked around. Some more digging can be done as to where specifically it messes up, but seeing as we're not going to be switching OBC super often I'd say it's fine to leave this as it is for now. Maybe we can open an issue to investigate this for after this PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try testing this out again for some investigation 👀 🍷