diff --git a/run.sh b/run.sh index cd8eb02..759723d 100755 --- a/run.sh +++ b/run.sh @@ -1,14 +1,19 @@ #!/bin/bash +ID=$1 +if [[ -n ${ID//[0-9]/} ]]; then + echo "Invalid pioneer number!" + exit 1 +fi source /opt/ros/hydro/setup.bash source /home/lab1_5/ws/ws_linux/devel/setup.bash export ROS_MASTER_URI='http://10.104.16.29:11311' -export ROS_IP=10.104.16.44 -export PIONIER_ID=4 -export ROS_NAMESPACE=/PIONIER${PIONIER_ID} +export ROS_IP=10.104.16.4${ID} +export PIONIER_ID=${ID} +export ROS_NAMESPACE=/PIONIER${ID} #rosrun rosaria RosAria _port:=/dev/ttyS0 & >/dev/null 2>&1 -rosrun rosaria RosAria _port:=/dev/ttyS0 _tf_prefix:=/PIONIER${PIONIER_ID} & +rosrun rosaria RosAria _port:=/dev/ttyS0 _tf_prefix:=/PIONIER${ID} & #rosrun safety cloud_reader 0.7 & -rosrun hokuyo_node hokuyo_node _frame_id:="PIONIER${PIONIER_ID}/laser${PIONIER_ID}" & +rosrun hokuyo_node hokuyo_node _frame_id:="${ROS_NAMESPACE}/laser" & #rosrun videostream videostream & #cvlc v4l2:///dev/video0 :v4l2-standard= :sout='#transcode{vcodec=FLV1,vb=0,scale=0,acodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/}' :sout-keep :live-caching=300 &