#!/usr/bin/env bash
# Docker entrypoint for Jetson Orin Nano Super ROS2 container

set -e

# Source ROS2
source /opt/ros/humble/setup.bash

# Source workspace if built
if [ -f /ros2_ws/install/local_setup.bash ]; then
    source /ros2_ws/install/local_setup.bash
fi

# Set DDS implementation
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

echo "[saltybot] ROS2 Humble ready — domain ID: ${ROS_DOMAIN_ID:-42}"
exec "$@"
