forked from ut-amrl/ut_automata
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart_car.sh
More file actions
executable file
·33 lines (24 loc) · 808 Bytes
/
Copy pathstart_car.sh
File metadata and controls
executable file
·33 lines (24 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Source environment variables
source /opt/ros/melodic/setup.bash
# Adding the paths to required packages to ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/f1tenth_course
export DISPLAY=:0
IPADDR="$(ip addr show wlan0 | grep -Po 'inet \K[\d.]+')"
echo "wlan0 IP address is $IPADDR"
if [[ "$IPADDR" == "10.147."* ]]; then
echo "Setting ROS_IP to $IPADDR"
export ROS_IP=$IPADDR
export ROS_MASTER_URI=http://$IPADDR:11311
fi
# Print the commands being executed, and exit if any command fails.
set -x -e
roscd f1tenth_course
# Run VESC driver
./bin/vesc_driver > /dev/null &
# Run the joystick driver
./bin/joystick --idx 1 > /dev/null &
# Hokuyo Lidar
roslaunch src/hokuyo/launch/hokuyo_10lx.launch > /dev/null &
# Run Websocket server.
./bin/websocket > /dev/null &