diff --git a/.gitignore b/.gitignore index 0954366ef7e..176668b4431 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ # build directories /build -/install /gmon.out *.swp /.settings diff --git a/install/env.sh b/install/env.sh new file mode 100644 index 00000000000..e9bc1810806 --- /dev/null +++ b/install/env.sh @@ -0,0 +1,5 @@ +# Here are some useful environment variables for setting up a consistent ROS environment +# some information on this can be found here: https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html +export ROS_DOMAIN_ID=19 # this is a random number, it's just important to keep it consistent across shells +export ROS_LOCALHOST_ONLY=1 # for our stack specifically, this is quite helpful. + diff --git a/makefile b/makefile index 4ddb5959fb1..837c56b2949 100644 --- a/makefile +++ b/makefile @@ -72,11 +72,11 @@ run-sim: # run our stack with default flags # TODO: actually name our software stack something run-our-stack: - ROS_LOCALHOST_ONLY=1 ros2 launch rj_robocup soccer.launch.py run_sim:=True + ros2 launch rj_robocup soccer.launch.py run_sim:=True # run sim with external referee (SSL Game Controller) run-sim-external: - ROS_LOCALHOST_ONLY=1 ros2 launch rj_robocup soccer.launch.py run_sim:=True use_internal_ref:=False + ros2 launch rj_robocup soccer.launch.py run_sim:=True use_internal_ref:=False run-sim-ex: run-sim-external @@ -95,7 +95,7 @@ run-manual: # same as run-real, with different server port run-alt-real: - ROS_DOMAIN_ID=2 ros2 launch rj_robocup soccer.launch.py run_sim:=False use_sim_radio:=False server_port:=25564 use_internal_ref:=False team_name:=AltRoboJackets team_flag:=-b + ros2 launch rj_robocup soccer.launch.py run_sim:=False use_sim_radio:=False server_port:=25564 use_internal_ref:=False team_name:=AltRoboJackets team_flag:=-b # run sim2play (requires external referee) run-sim2play: diff --git a/source.bash b/source.bash index 85a5e0bedf1..d86ad19995f 100755 --- a/source.bash +++ b/source.bash @@ -9,3 +9,6 @@ if [[ $SHELL == *"zsh"* ]]; then source /opt/ros/humble/setup.zsh source install/setup.zsh fi + +source install/env.sh +