mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
fix: make auto start scripts work when not in specific dir
This commit is contained in:
@@ -15,10 +15,7 @@ echo "[INFO] Starting ROS node..."
|
|||||||
source /opt/ros/humble/setup.bash
|
source /opt/ros/humble/setup.bash
|
||||||
|
|
||||||
# Source your workspace setup script
|
# Source your workspace setup script
|
||||||
source /home/clucky/rover-ros2/install/setup.bash
|
source $(dirname $0)/../install/setup.bash
|
||||||
|
|
||||||
# CD to directory
|
|
||||||
cd /home/clucky/rover-ros2/
|
|
||||||
|
|
||||||
# Launch the ROS 2 node with the desired mode
|
# Launch the ROS 2 node with the desired mode
|
||||||
ros2 launch anchor_pkg rover.launch.py mode:=anchor
|
ros2 launch anchor_pkg rover.launch.py mode:=anchor
|
||||||
|
|||||||
@@ -15,10 +15,7 @@ echo "[INFO] Starting ROS node..."
|
|||||||
source /opt/ros/humble/setup.bash
|
source /opt/ros/humble/setup.bash
|
||||||
|
|
||||||
# Source your workspace setup script
|
# Source your workspace setup script
|
||||||
source /home/clucky/rover-ros2/install/setup.bash
|
source $(dirname $0)/../install/setup.bash
|
||||||
|
|
||||||
# CD to directory
|
|
||||||
cd /home/clucky/rover-ros2/
|
|
||||||
|
|
||||||
# Launch the ROS 2 node
|
# Launch the ROS 2 node
|
||||||
ros2 run headless_pkg headless_full
|
ros2 run headless_pkg headless_full
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
ANCHOR_WS="/home/clucky/rover-ros2"
|
ANCHOR_WS="$(dirname $0)/.."
|
||||||
AUTONOMY_WS="/home/clucky/rover-Autonomy"
|
AUTONOMY_WS="$ANCHOR_WS/../rover-Autonomy"
|
||||||
BAG_LOCATION="/home/clucky/bags/autostart"
|
BAG_LOCATION="$ANCHOR_WS/../bags/autostart"
|
||||||
|
|
||||||
# Wait for a network interface to be up (not necessarily online)
|
# Wait for a network interface to be up (not necessarily online)
|
||||||
while ! ip link show | grep -q "state UP"; do
|
while ! ip link show | grep -q "state UP"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user