mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
feat: add systemd files from NUC
This commit is contained in:
24
auto_start/auto_start_anchor.sh
Executable file
24
auto_start/auto_start_anchor.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for a network interface to be up (not necessarily online)
|
||||
while ! ip link show | grep -q "state UP"; do
|
||||
echo "[INFO] Waiting for active network interface..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "[INFO] Network interface is up!"
|
||||
|
||||
# Your actual ROS node start command goes here
|
||||
echo "[INFO] Starting ROS node..."
|
||||
|
||||
# Source ROS 2 Humble setup script
|
||||
source /opt/ros/humble/setup.bash
|
||||
|
||||
# Source your workspace setup script
|
||||
source /home/clucky/rover-ros2/install/setup.bash
|
||||
|
||||
# CD to directory
|
||||
cd /home/clucky/rover-ros2/
|
||||
|
||||
# Launch the ROS 2 node with the desired mode
|
||||
ros2 launch rover_launch.py mode:=anchor
|
||||
24
auto_start/auto_start_core_headless.sh
Executable file
24
auto_start/auto_start_core_headless.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for a network interface to be up (not necessarily online)
|
||||
while ! ip link show | grep -q "state UP"; do
|
||||
echo "[INFO] Waiting for active network interface..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "[INFO] Network interface is up!"
|
||||
|
||||
# Your actual ROS node start command goes here
|
||||
echo "[INFO] Starting ROS node..."
|
||||
|
||||
# Source ROS 2 Humble setup script
|
||||
source /opt/ros/humble/setup.bash
|
||||
|
||||
# Source your workspace setup script
|
||||
source /home/clucky/rover-ros2/install/setup.bash
|
||||
|
||||
# CD to directory
|
||||
cd /home/clucky/rover-ros2/
|
||||
|
||||
# Launch the ROS 2 node
|
||||
ros2 run core_pkg headless
|
||||
Reference in New Issue
Block a user