Skip to content

Commit

Permalink
added inifite loop so ros gets restarted after exit
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyZJiang committed Nov 8, 2023
1 parent bbd2798 commit 32f10b1
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 12 deletions.
8 changes: 6 additions & 2 deletions autostart/scripts/launch/launch_auxiliary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ log() {
}

log "Launching unitree_auxiliary..."
roslaunch ice9_unitree unitree_auxiliary.launch
log "Error! unitree_auxiliary exited."
while true; do
roslaunch ice9_unitree unitree_auxiliary.launch
log "Error! unitree_auxiliary exited."
log "Restarting unitree_auxiliary..."
sleep 1
done
log "Ended."
8 changes: 6 additions & 2 deletions autostart/scripts/launch/launch_camera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ else
fi

log "Launching mjpeg_cam..."
roslaunch ice9_unitree mjpeg_cam.launch device_name:=/dev/video1
log "Error! mjpeg_cam exited."
while true; do
roslaunch ice9_unitree mjpeg_cam.launch device_name:=/dev/video1
log "Error! mjpeg_cam exited."
log "Restarting mjpeg_cam..."
sleep 1
done
log "Ended."
8 changes: 6 additions & 2 deletions autostart/scripts/launch/launch_reach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ log() {
}

log "Launching reach_ros..."
roslaunch ice9_unitree reach_ros.launch
log "Error! reach_ros exited."
while true; do
roslaunch ice9_unitree reach_ros.launch
log "Error! reach_ros exited."
log "Restarting reach_ros..."
sleep 1
done
log "Ended."
8 changes: 6 additions & 2 deletions autostart/scripts/launch/launch_slam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ log() {
echo $1
}
log "Launching slam_planner_online..."
roslaunch slam_planner slam_planner_online.launch
log "Error! slam_planner_online exited."
while true; do
roslaunch slam_planner slam_planner_online.launch
log "Error! slam_planner_online exited."
log "Restarting slam_planner_online..."
sleep 1
done
log "Ended."
8 changes: 6 additions & 2 deletions autostart/scripts/launch/launch_unitree_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ log() {
}

log "Launching unitree_legged_real..."
roslaunch unitree_legged_real real.launch
log "Error! unitree_legged_real exited."
while true; do
roslaunch unitree_legged_real real.launch
log "Error! unitree_legged_real exited."
log "Restarting unitree_legged_real..."
sleep 1
done
log "Ended."
9 changes: 7 additions & 2 deletions autostart/scripts/launch_roscore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ if [ ${is_nano_15} ]; then
done
log "Husarnet ready, starting roscore..."
sleep 1

source ${HOME}/Unitree_GPS_Integration/autostart/scripts/ros_setup.bash
roscore
log "Error! roscore exited."
while true; do
roscore
log "Error! roscore exited."
log "Restarting roscore..."
sleep 1
done
else
log "Not Nano 15, skipped."
fi
Expand Down

0 comments on commit 32f10b1

Please sign in to comment.