Skip to content

Commit

Permalink
broken ros2 controller - previous worked fine
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed Nov 20, 2024
1 parent d0a083f commit e00cf25
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 16 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-teleop-twist-keyboard

RUN vcs import src < src/rosbot/rosbot_hardware.repos && \
cp -r src/ros2_controllers/diff_drive_controller src/ && \
cp -r src/ros2_controllers/imu_sensor_broadcaster src/ && \
rm -rf src/ros2_controllers && \
# cp -r src/ros2_controllers/diff_drive_controller src/ && \
# cp -r src/ros2_controllers/imu_sensor_broadcaster src/ && \
# rm -rf src/ros2_controllers && \
rm -r src/rosbot_gazebo

# Create a script to install runtime dependencies for final image
Expand Down
8 changes: 4 additions & 4 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ services:
build:
context: ..
dockerfile: docker/Dockerfile
# command: tail -f /dev/null
network_mode: host
ipc: host
devices:
- ${SERIAL_PORT:?err}
- /dev/bus/usb/ # FTDI
environment:
- ROS_NAMESPACE # For healthckeck node
# environment:
# - ROS_NAMESPACE
# command: tail -f /dev/null
command: >
ros2 launch rosbot_bringup combined.launch.py
mecanum:=${MECANUM:-False}
serial_port:=$SERIAL_PORT
serial_baudrate:=576000
namespace:=${ROS_NAMESPACE:-rosbot}
# namespace:=${ROS_NAMESPACE:-rosbot}
11 changes: 10 additions & 1 deletion docker/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@ flash-firmware: _install-yq _run-as-user
echo "Probably user laptop"
gpio_chip=/dev/bus/usb
serial_port=$SERIAL_PORT
enable_usb="--usb"
fi

echo "Flashing the firmware for STM32 microcontroller in ROSbot through $serial_port"
docker run --rm -it \
--device $gpio_chip \
--device $serial_port \
docker-rosbot \
ros2 run rosbot_utils flash_firmware --usb
ros2 run rosbot_utils flash_firmware ${enable_usb}

run:
#/bin/bash
docker compose up

build:
#/bin/bash
docker compose build

_run-as-root:
#!/bin/bash
Expand Down
28 changes: 28 additions & 0 deletions rosbot/rosbot_hardware copy.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repositories:
rosbot_hardware_interfaces:
type: git
url: https://github.com/husarion/rosbot_hardware_interfaces.git
version: main
ros_components_description:
type: git
url: https://github.com/husarion/ros_components_description.git
version: 1cb25600afa5941d21d48c0af8e63ad2eb3afaa0
husarion_controllers:
type: git
url: https://github.com/husarion/husarion_controllers
version: 217b09830f5f42930098b9992eda41710702b625
# Waiting for backporting to the humble version
# https://github.com/ros-controls/ros2_controllers/pull/726 and
# https://github.com/ros-controls/ros2_controllers/pull/831
ros2_controllers:
type: git
url: https://github.com/delihus/ros2_controllers
version: humble
micro_ros_msgs:
type: git
url: https://github.com/micro-ROS/micro_ros_msgs.git
version: humble
micro-ROS-Agent:
type: git
url: https://github.com/micro-ROS/micro-ROS-Agent.git
version: humble
9 changes: 1 addition & 8 deletions rosbot/rosbot_hardware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ repositories:
husarion_controllers:
type: git
url: https://github.com/husarion/husarion_controllers
version: 217b09830f5f42930098b9992eda41710702b625
# Waiting for backporting to the humble version
# https://github.com/ros-controls/ros2_controllers/pull/726 and
# https://github.com/ros-controls/ros2_controllers/pull/831
ros2_controllers:
type: git
url: https://github.com/delihus/ros2_controllers
version: humble
version: main
micro_ros_msgs:
type: git
url: https://github.com/micro-ROS/micro_ros_msgs.git
Expand Down

0 comments on commit e00cf25

Please sign in to comment.