diff --git a/docker/.env b/docker/.env index bec99c89..05b532ca 100644 --- a/docker/.env +++ b/docker/.env @@ -1 +1 @@ -ROS_NAMESPACE=rosbot +ROBOT_NAMESPACE=rosbot diff --git a/docker/compose.hardware.yaml b/docker/compose.hardware.yaml index 7083e47f..259561e6 100644 --- a/docker/compose.hardware.yaml +++ b/docker/compose.hardware.yaml @@ -9,11 +9,9 @@ services: devices: - ${SERIAL_PORT:-/dev/ttyUSB0} - /dev/bus/usb/ # FTDI - environment: - - FASTRTPS_DEFAULT_PROFILES_FILE=/shm-only.xml - - USER=${USER:-root} command: > ros2 launch rosbot_bringup combined.launch.py mecanum:=${MECANUM:-False} + namespace:=${ROBOT_NAMESPACE:-rosbot} serial_port:=${SERIAL_PORT:-/dev/ttyUSB0} serial_baudrate:=576000 diff --git a/docker/compose.simulation.yaml b/docker/compose.simulation.yaml index bddae597..a927a1cd 100644 --- a/docker/compose.simulation.yaml +++ b/docker/compose.simulation.yaml @@ -27,5 +27,5 @@ services: <<: [ *gpu-config] command: > ros2 launch rosbot_gazebo simulation.launch.py - namespace:=${ROS_NAMESPACE:-""} mecanum:=${MECANUM:-False} + namespace:=${ROBOT_NAMESPACE:-rosbot} diff --git a/docker/justfile b/docker/justfile index 50fbe34d..0e6f5ef4 100644 --- a/docker/justfile +++ b/docker/justfile @@ -13,7 +13,7 @@ alias teleop := run-teleop-docker # run teleop_twist_keybaord (inside rviz2 container) run-teleop-docker: _run-as-user #!/bin/bash - docker compose exec rosbot /bin/bash -c "/ros_entrypoint.sh ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/${ROS_NAMESPACE}" + docker compose exec rosbot /bin/bash -c "/ros_entrypoint.sh ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/${ROBOT_NAMESPACE}" flash-firmware: _install-yq _run-as-user #!/bin/bash @@ -29,9 +29,9 @@ flash-firmware: _install-yq _run-as-user gpio_chip=/dev/gpiochip4 serial_port=/dev/ttyS4 else - echo "Probably user laptop" + echo "Probably user computer" gpio_chip=/dev/bus/usb - serial_port=$SERIAL_PORT + serial_port=/dev/ttyUSB0 enable_usb="--usb" fi @@ -42,13 +42,13 @@ flash-firmware: _install-yq _run-as-user docker-rosbot \ ros2 run rosbot_utils flash_firmware ${enable_usb} -run: +run_hardware: #/bin/bash - docker compose up + docker compose -f compose.hardware.yaml up -build: +build_hardware: #/bin/bash - docker compose build + docker compose -f compose.hardware.yaml build _run-as-root: #!/bin/bash