Skip to content

Instantly share code, notes, and snippets.

@adamheins
Last active September 1, 2020 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamheins/1b9ef77e3a2fea4e15edfc1b7457ff57 to your computer and use it in GitHub Desktop.
Save adamheins/1b9ef77e3a2fea4e15edfc1b7457ff57 to your computer and use it in GitHub Desktop.
Run second ROS, Gazebo, and gzweb instances on a single computer.
# run a secondary ROS and Gazebo instance
#
# when starting ROS master, the new port needs to be specified:
# roscore -p $ROS_PORT
#
# gzweb does not require any environment variables, but the port must be
# specified when gzweb is started:
# npm start -p $GZWEB_PORT
#
# Gazebo does not require any special options when run
# default ROS master port is 11311
export ROS_PORT="11312"
export ROS_MASTER_URI="http://localhost:$ROS_PORT"
# default Gazebo port is 11345
export GAZEBO_PORT="11346"
export GAZEBO_MASTER_URI="http://localhost:$GAZEBO_PORT"
# default
export GZWEB_PORT="8081"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment