diff --git a/scl7.2/README.md b/scl7.2/README.md new file mode 100644 index 0000000..1066085 --- /dev/null +++ b/scl7.2/README.md @@ -0,0 +1,43 @@ +### Gazebo (http://gazebosim.org) +> Installation scripts for compiling and deploying Gazebo from source. + +## How to install gazebo +```shell +./gazebo7_install.sh +``` + +## How to install gzweb (web client for Gazebo) +```shell +./gzweb_install.sh +``` + +## How to run Gazebo with remote 3D rendering +1. make sure that the remote machine has VirtualGL and a TurboVNC installed +2. ssh to the remote machine +3. start the vncserver: +```shell +vncserver :10 #10 is the display number. Any free display number will do. +``` +4. start a VNC session from the local machine to the display #10 of the remote machine: +```shell +vncviewer :10 +``` +5. start a shell in the remote machine +6. launch gazebo with VirtualGL: +```shell +vglrun ./start_gazebo.sh +``` + +## How to run gzweb (web client for Gazebo) +1. start gzserver+gzweb on the machine with Gazebo installed: +```shell +./start_gzweb.sh +``` +Note: gzweb's log file is /tmp/gzweb.log. + +Now you should be able to use the Gazebo's web interface from any browser with WebGL and WebSocket support. Gazebo is typically available at http://<address of machine with gazebo installed>:8080. See gzweb log file for the exact URL. + +## How to stop gzweb (web client for Gazebo) +```shell +./stop_gzweb.sh +``` diff --git a/scl7.2/start_gzweb.sh b/scl7.2/start_gzweb.sh index 05601dd..9ab5089 100755 --- a/scl7.2/start_gzweb.sh +++ b/scl7.2/start_gzweb.sh @@ -3,9 +3,16 @@ SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $SCRIPT_PATH/load-environment +logfile_gzserver=/tmp/gzserver.log +logfile_gzweb=/tmp/gzweb.log + #nohup is used for a quick and dirty demonization here if pgrep gzserver &>/dev/null ; then - nohup $PREFIX/bin/gzserver --verbose 0<&- &>/tmp/gzserver.log & + echo "gzserver already running" +else + echo "starting gzserver... logging to $logfile_gzserver" + nohup $PREFIX/bin/gzserver --verbose 0<&- &>$logfile_gzserver & fi -nohup $HOME/osrf-gzweb-b027171f5aa1/start_gzweb.sh 0<&- &>/tmp/gzweb.log & +echo "starting gzweb... logging to $logfile_gzweb" +nohup $HOME/osrf-gzweb-b027171f5aa1/start_gzweb.sh 0<&- &>$logfile_gzweb &