diff --git a/scripts/setup_auto_sourcing.bash b/scripts/setup_auto_sourcing.bash index 435a4c37..da0f7fc6 100755 --- a/scripts/setup_auto_sourcing.bash +++ b/scripts/setup_auto_sourcing.bash @@ -22,12 +22,12 @@ if [[ " ${negative_answers[*]} " =~ " ${user_answer} " ]]; then print_and_exit "Aborting the setup of autosourcing. Exiting..." fi -rtw_file=".ros_team_ws_rc" +rtw_file="rtwrc" rtw_file_location=~/"$rtw_file" template_location="$FRAMEWORK_BASE_PATH/templates/$rtw_file" echo "Copying ${rtw_file} to your home folder." if ! [ -f "$HOME/$rtw_file" ]; then - cp "${template_location}" ~/. + cp "${template_location}" ~/.ros_team_workspace/. else echo "" notify_user "${rtw_file} already exists." @@ -63,7 +63,8 @@ echo "Updating your .bashrc file." bashrc_location=~/.bashrc if ! ( grep -q '\..*\.ros_team_ws_rc' $bashrc_location || grep -q 'source.*\.ros_team_ws_rc' $bashrc_location ); then echo "" >> $bashrc_location - echo "# automatically source RosTeamWorkspace if the .ros_team_ws file is present in your home folder." >> $bashrc_location + echo "# Automatically source RosTeamWorkspace if the ~/.ros_team_workspace/rtwrc file is present in your home folder." >> $bashrc_location + echo "# Some ROS 2 related varialbes are set in this configuration file, check if you have any configuration-related issues." >> $bashrc_location echo "if [ -f ~/.ros_team_ws_rc ]; then" >> $bashrc_location echo " . ~/.ros_team_ws_rc" >> $bashrc_location echo "fi" >> $bashrc_location diff --git a/templates/.ros_team_ws_rc b/templates/rtwrc similarity index 55% rename from templates/.ros_team_ws_rc rename to templates/rtwrc index 3769ea6d..28183d35 100644 --- a/templates/.ros_team_ws_rc +++ b/templates/rtwrc @@ -1,31 +1,36 @@ #!/bin/bash -# if you did not install ros under /opt/ros// then you have to set the ALTERNATIVE_ROS__LOCATION -# to point to your installation folder e.g. ALTERNATIVE_ROS_ROLLING_LOCATION=/home/user/my_installation_folder/rolling/ -# For other ros versions simply add ALTERNATIVE_ROS__LOCATION e.g. ALTERNATIVE_ROS_FOXY_LOCATION -ALTERNATIVE_ROS_ROLLING_LOCATION="" - +# Setup for RTW-Pro version TEAM_LICENSE="Apache License 2.0" - TEAM_REPOSITORY_SERVER="https://github.com" - TEAM_PRIVATE_CONFIG_PATH="" +# if you did not install ROS under /opt/ros// then you have to set the ALTERNATIVE_ROS__LOCATION +# to point to your installation folder e.g. ALTERNATIVE_ROS_ROLLING_LOCATION=/home/user/my_installation_folder/rolling/ +# For other ros versions simply add ALTERNATIVE_ROS__LOCATION e.g. ALTERNATIVE_ROS_FOXY_LOCATION +# This also enables support for older ROS 2 version within docker (for example useful to run `rviz2` outside of the container) +export ALTERNATIVE_ROS_FOXY_LOCATION="/opt/ros/rolling" +export ALTERNATIVE_ROS_GALACTIC_LOCATION="/opt/ros/rolling" +# export ALTERNATIVE_ROS_HUMBLE_LOCATION="/opt/ros/rolling" +export ALTERNATIVE_ROS_IRON_LOCATION="/opt/ros/rolling" + # set this to the location of RosTeamWorkspace source /setup.bash # User specific setup/variables +# DDS setup +#export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +#export CYCLONEDDS_URI=~/workspace/cyclonedds.xml -#export CYCLONEDDS_URI='ADD_HERE_INTERFACE_NAME' - -export ROS_AUTOMATIC_DISCOVERY_RANGE="LOCALHOST" # Doc: https://docs.ros.org/en/rolling/Tutorials/Advanced/Improved-Dynamic-Discovery.html -export ROS_DOMAIN_ID=0 # Set your Domain ID if you are in a network with multiple computers +export ROS_DOMAIN_ID=28 +export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST # Doc: https://docs.ros.org/en/rolling/Tutorials/Advanced/Improved-Dynamic-Discovery.html +#export ROS_STATIC_PEERS=; # needed to execute cppcheck version 2.7 used in pre-commit export AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=true # Logging setup -# export RCUTILS_LOGGING_CONFIG_FILE="/home/deniss/workspace/ros2_logging_config" +# export RCUTILS_LOGGING_CONFIG_FILE="~/.ros/ros2_logging_config" #export RCUTILS_CONSOLE_OUTPUT_FORMAT="[{severity} {time}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})" # Custom logging format export RCUTILS_COLORIZED_OUTPUT=1 #export RCUTILS_LOGGING_USE_STDOUT=1 # force all logging output to stdout