fix: names in ROS2 files were incorrect for headless_full, add new service files for NUC

This commit is contained in:
David Sharpe
2025-08-21 16:31:59 -05:00
parent 37774c0c31
commit 10757c8c71
6 changed files with 43 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
#!/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 headless_pkg headless_full

14
headless_full.service Normal file
View File

@@ -0,0 +1,14 @@
[Unit]
Description=Autostart headless core node for controlling the rover without a base station
After=systemd-user-sessions.service
Requires=systemd-user-sessions.service
[Service]
ExecStart=/home/clucky/auto_start/auto_start_headless_full.sh
Restart=always
RestartSec=10
User=clucky
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,4 +1,4 @@
[develop] [develop]
script_dir=$base/lib/core_pkg script_dir=$base/lib/headless_pkg
[install] [install]
install_scripts=$base/lib/core_pkg install_scripts=$base/lib/headless_pkg

View File

@@ -7,8 +7,7 @@ setup(
version='0.0.0', version='0.0.0',
packages=find_packages(exclude=['test']), packages=find_packages(exclude=['test']),
data_files=[ data_files=[
('share/ament_index/resource_index/packages', ('share/ament_index/resource_index/packages', ['resource/' + package_name]),
['resource/' + package_name]),
('share/' + package_name, ['package.xml']), ('share/' + package_name, ['package.xml']),
], ],
install_requires=['setuptools'], install_requires=['setuptools'],
@@ -19,7 +18,7 @@ setup(
license='All Rights Reserved', license='All Rights Reserved',
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
"headless = headless_pkg.headless:main", "headless_full = src.headless_node:main",
], ],
}, },
) )