TurtleBotJEPA-PPO / setup_terminal.sh
penji2803's picture
TurtleBotJEPA-PPO: ready-to-run JEPA + PPO policy for a real TurtleBot3 (LDS-02), guide incl. mapping and map goals
4421dc3 verified
Raw History Blame Contribute Delete
1.52 kB
# Prepares THIS terminal on the laptop to talk to the TurtleBot3. In every new terminal:
# cd ~/TurtleBotJEPA-PPO && source setup_terminal.sh (real robot, ROS_DOMAIN_ID 30)
# source setup_terminal.sh sim (Gazebo demo: ROS_DOMAIN_ID 77, this computer only)
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
conda deactivate 2>/dev/null || true # ROS 2 Humble needs the system Python, not conda
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v -i conda | paste -sd:)
if [ -f /opt/ros/humble/setup.bash ]; then source /opt/ros/humble/setup.bash; else echo "ROS 2 Humble not found in /opt/ros/humble - see README Part A"; fi
[ -f ~/turtlebot3_ws/install/setup.bash ] && source ~/turtlebot3_ws/install/setup.bash # only if you built TurtleBot3 from source
[ -f /usr/share/gazebo/setup.sh ] && source /usr/share/gazebo/setup.sh
export TURTLEBOT3_MODEL=burger
if [ "$1" = "sim" ]; then
export ROS_DOMAIN_ID=77 ROS_LOCALHOST_ONLY=1 # can never talk to a real robot
else
export ROS_DOMAIN_ID=${TB3_DOMAIN_ID:-30} # must match the robot (ROBOTIS default: 30)
unset ROS_LOCALHOST_ONLY # we need to reach the robot over Wi-Fi
fi
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp # ROBOTIS default middleware (must match the robot)
cd "$DIR"
echo "Ready: ROS 2 $ROS_DISTRO, ROS_DOMAIN_ID=$ROS_DOMAIN_ID, TURTLEBOT3_MODEL=$TURTLEBOT3_MODEL, folder $(pwd)"