Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Nov 28, 2024
1 parent 4be5e6f commit 5057295
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docker/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ROS_NAMESPACE=rosbot
ROBOT_NAMESPACE=rosbot
4 changes: 1 addition & 3 deletions docker/compose.hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker/compose.simulation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
14 changes: 7 additions & 7 deletions docker/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 5057295

Please sign in to comment.