Skip to content

Commit

Permalink
add install script
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonR99 committed Jun 23, 2024
1 parent 02ad394 commit f656387
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
7 changes: 6 additions & 1 deletion src/rove_launch_handler/scripts/launch_script.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
[Unit]
Descript=Robot launch script
After=network.target

[Service]
ExecStart=/usr/bin/launch_script.sh
Environment="ROS_LOG_DIR=/var/log/ros2; ROS_DOMAIN_ID=96"
ExecStart=/bin/bash -c 'source /home/simon/Workspace/capra/rove/install/setup.bash; ros2 launch rove_launch_handler launch_handler.launch.py;'
RemainAfterExit=no
Restart=on-failure
RestartSec=2s

[Install]
WantedBy=multi-user.target
7 changes: 0 additions & 7 deletions src/rove_launch_handler/scripts/launch_script.sh

This file was deleted.

8 changes: 5 additions & 3 deletions utils/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

sudo cp ./src/rove_launch_handler/scripts/launch_script.sh /usr/bin/launch_script.sh
sudo mkdir -p /var/log/ros2
sudo chmod 775 /var/log/ros2
sudo cp ./src/rove_launch_handler/scripts/launch_script.service /lib/systemd/system/launch_script.service
sudo systemctl enable launch_script.service
sudo systemctl daemon-reload
sudo systemctl enable launch_script.service
sudo systemctl start launch_script.service

0 comments on commit f656387

Please sign in to comment.