Skip to content

Launching using bash scripts

muralivnv edited this page Dec 29, 2017 · 2 revisions

Instead of using command roslaunch to launch the package as mentioned in launching-package, a bash-script is used which will provide some additional functionality during launch.
Two bash-scripts launch_asl_gremlin.sh and launch_asl_gremlin_split.sh were provided to do so. The port number to which the arduino is connected need to be changed inside these two bash-scripts similar to the configuration in launching-package.
The reason for using bash-script is that, the bash-script automatically sets the ROS parameters ROS_IP and ROS_MASTER_URI to the rover's IP address in-order to setup network communication.

Connecting to Remote-ROS-MASTER

The same bash-scripts can be used to connect the rover to remote ROS-MASTER. Both the bash-scripts accepts one command line argument, which is the ROS-MASTER-IP.
For example, let's say that there is a ground-station with IP:= 192.168.0.113 and rover with IP:= 192.168.0.102. And we want the rover to connect to the ROS-MASTER that's already running on ground-station. So, to achieve this

launch_asl_gremlin.sh 192.168.0.113

(or)

launch_asl_gremlin_split.sh 192.168.0.113

NOTE: If no command line argument(IP) is not provided to bash-script, then the ROS_MASTER will be initiated on the rover.

launch_asl_gremlin_split.sh (Recommended)

When the bash-script launch_asl_gremlin.sh is used all the STDOUT from ROS will be displayed in a single terminal. But when the bash-script launch_asl_gremlin_split.sh is used, the terminal will be split into three parts. The STDOUT from MAVROS and ROSSERIAL will be displayed in one part, STDOUT from asl_gremlin_pkg will be displayed in another part and finally the third split screen part can be used for setting waypoints, etc

<<PrevPage | NextPage>>