Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ros env vars to source script #2288

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# build directories
/build
/install
/gmon.out
*.swp
/.settings
Expand Down
5 changes: 5 additions & 0 deletions install/env.sh
Original file line number Diff line number Diff line change
@@ -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.

6 changes: 3 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions source.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ if [[ $SHELL == *"zsh"* ]]; then
source /opt/ros/humble/setup.zsh
source install/setup.zsh
fi

source install/env.sh

Loading