Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
0cc94db
Modify: change permission
yjHuang251 Jan 13, 2025
f226297
Add: necessary packages
yjHuang251 Jan 13, 2025
9de92b1
Add minimal phidgets_drivers
jossiewang Jan 14, 2025
930d4b6
Add: imu_drive
mac781 Jan 14, 2025
f9ae698
Feat: Add all files in local_filter package
yjHuang251 Jan 14, 2025
665034e
Modify: launch files to ROS2
yjHuang251 Jan 14, 2025
493b3bc
Modify: yaml files to ROS2
yjHuang251 Jan 14, 2025
1fb1abe
Add: (BeaconProb) Add init pkg w/ basic publisher
jossiewang Jan 14, 2025
c1afbca
Update: colcon build ok
yjHuang251 Jan 15, 2025
89416fe
Add: (BeaconProb) add the subscriber, tested
jossiewang Jan 15, 2025
3303820
Modified: (BeaconProb) lidar_pose publisher
jossiewang Jan 15, 2025
d1fc03a
Fix: (BeaconProb) build problems w/ dependencies
jossiewang Jan 16, 2025
bfe436b
Fix: (BeaconProb) include .xml, .yml launch files
jossiewang Jan 16, 2025
68cba34
Add: (BeaconProb) Add launch for lidar w/ obstacle
jossiewang Jan 16, 2025
8774c0d
Add: (BeaconProb) Obstacles subscriber
jossiewang Jan 16, 2025
4388a34
Modified: (BeaconProb) use debug level logger
jossiewang Jan 16, 2025
515b0fd
Add: quaternion and euler conversion
jossiewang Jan 16, 2025
f842727
Add: (BeaconProb) methods
jossiewang Jan 16, 2025
619abd2
Merge pull request #11 from mac781/ft-imu_drive
wintera1233 Jan 16, 2025
8c088fa
Add: (BeaconProb) subsribe to pred_pose
jossiewang Jan 16, 2025
71fc01e
Add: (BeaconProb) data process
jossiewang Jan 16, 2025
2801ba5
ft-rival_localization
mac781 Jan 16, 2025
76e543f
Fix: (BeaconProb) lidar_cov
jossiewang Jan 16, 2025
14e4cdf
Fix: (BeaconProb) computation time
jossiewang Jan 16, 2025
809aa7f
Fix within_lock
mac781 Jan 17, 2025
c92ae3d
Add: ros bridge and rosserial by @pomelo925
jossiewang Jan 17, 2025
e99717b
Add: docker compose STM32 - ROS2
jossiewang Jan 17, 2025
cb6a619
Fix: project removal / Modify: compose for all
jossiewang Jan 17, 2025
8efc470
Fix: (OdomComm) compose w/ comm mount
jossiewang Jan 17, 2025
916d112
Merge pull request #17 from jossiewang/ft-OdomComm
jossiewang Jan 17, 2025
d7acbcb
Add: (Docker-testBot) ROS2 for testBot
jossiewang Jan 17, 2025
326a541
Merge pull request #18 from jossiewang/ft-testBotROS2
jossiewang Jan 17, 2025
5cb8cea
Merge pull request #15 from mac781/ft-rival_localization
jossiewang Jan 17, 2025
88a3147
Merge remote-tracking branch 'origin/devel' into ft.local
yjHuang251 Jan 18, 2025
2bfc9b8
launch files to ROS2
yjHuang251 Jan 18, 2025
ced5083
Add: (BeaconProb) obstacle visualization test
jossiewang Jan 20, 2025
141efa6
Add: (BeaconProb) explicit probability shown
jossiewang Jan 20, 2025
3cb48da
Add: (BeaconProb) a simulated predict publisher
jossiewang Jan 20, 2025
3d87ff4
Fix: (BeaconProb) frame_id
jossiewang Jan 20, 2025
eaa04f4
Modified: (BeaconProb) frame_id and some bugs
jossiewang Jan 20, 2025
d0be231
Fix: (BeaconProb) visualization bug
jossiewang Jan 20, 2025
033af7e
Fix: commit bugs
jossiewang Jan 20, 2025
b249df1
Add: (BeaconProb) load params form yml
jossiewang Jan 20, 2025
4f16511
Add angular_velocity
mac781 Jan 21, 2025
13a44e4
Modify: ROS_DOMAIN_ID
wintera1233 Jan 22, 2025
ee173c2
Add: stable EKF_pkg
wintera1233 Jan 22, 2025
c2a148f
Merge pull request #21 from DIT-ROBOTICS/ft-BeaconProb
wintera1233 Jan 22, 2025
7b1f40d
Merge branch 'fix-imu_drive' into devel
jossiewang Jan 22, 2025
6faa947
Fix: wrong odom format
wintera1233 Jan 22, 2025
1b26194
Add: dds communication dep & env variable
wintera1233 Jan 22, 2025
6067b4e
Add: env variablez
wintera1233 Jan 22, 2025
6fdfc61
Modify: params
wintera1233 Jan 22, 2025
a07011b
Add: predict_pose covarience
wintera1233 Jan 23, 2025
5e9946e
Add: publish final pose covariance
jossiewang Jan 23, 2025
e6caa7d
Add: initialpose sub
wintera1233 Jan 23, 2025
c12b6c6
Add: initialpose sub
wintera1233 Jan 23, 2025
0523c01
Modified: final pose msg type
jossiewang Jan 23, 2025
e75e983
Merge remote-tracking branch 'origin/devel' into devel
wintera1233 Jan 23, 2025
8098d17
Modified: gitignore bag/
wintera1233 Jan 23, 2025
16fb103
Modify: open cam subscriber
wintera1233 Jan 23, 2025
42bdede
Fix: horrible Covariance (split predict / update)
wintera1233 Jan 23, 2025
4550fd0
Add: ROS_DOMAIN variable
wintera1233 Jan 23, 2025
73b1a99
Fix: wrong array position
wintera1233 Jan 23, 2025
75ba6ee
Update: local filter
yjHuang251 Jan 28, 2025
04a2876
Modified: process cov(Q)
wintera1233 Feb 6, 2025
c6c8cb3
Add: lidar W/ ns
wintera1233 Feb 6, 2025
297f753
Modified: (Env) ros2-dev service name & ignored
jossiewang Feb 7, 2025
f315cfc
Add: bag recording launch
jossiewang Feb 7, 2025
01cfa35
Modify: cov
wintera1233 Feb 7, 2025
53eb778
Merge remote-tracking branch 'origin/devel' into devel
wintera1233 Feb 7, 2025
bcdc931
Add: test launch file
wintera1233 Feb 7, 2025
5a6cb9b
Feat: Load odometry covariance
yjHuang251 Feb 8, 2025
c113c1c
Modified: (Env) standalone container name
jossiewang Feb 9, 2025
f57f2c3
Modified: (Tool) do not split record
jossiewang Feb 9, 2025
d3897a1
Add: (TOOL) launch for play and record tests
jossiewang Feb 9, 2025
33bb832
Fix: (TOOL) bag_test, rm topic args
jossiewang Feb 10, 2025
7dfef97
Modify: unit of angularr integration
wintera1233 Feb 10, 2025
2dc22c5
Revert "Modify: unit of angularr integration"
wintera1233 Feb 10, 2025
1ac40ed
Merge remote-tracking branch 'origin/devel' into devel
wintera1233 Feb 10, 2025
6f70add
Modify: unit of angularr integration
wintera1233 Feb 10, 2025
afccffd
Modify: F-array
wintera1233 Feb 10, 2025
8ef76d1
Modify: small dia.
wintera1233 Feb 10, 2025
93da1d2
Modify: what did i modify??
wintera1233 Feb 10, 2025
de05aa9
Modify: P, Q unrelated items
wintera1233 Feb 10, 2025
1117751
Modify: smaller Q[35]
wintera1233 Feb 10, 2025
dd61f3a
Modify: P[35]
wintera1233 Feb 10, 2025
3335b9f
Fix: reasonable cov
wintera1233 Feb 10, 2025
d420f86
modified: change side
wintera1233 Feb 10, 2025
fab8c90
Add: real test launch file
wintera1233 Feb 10, 2025
5c9e2d3
Modify: odom to map coord and publish
yjHuang251 Feb 11, 2025
5b541b8
Modified: (EKF) odom as SI units
jossiewang Feb 11, 2025
9bdc6ff
Modified: (testBot) DOMAIN_ID, RMW_IMPLEMENTATION
jossiewang Feb 11, 2025
0a0afb1
modified: change bag name
wintera1233 Feb 11, 2025
4f63d89
Modified: change ROSDOMAIN
wintera1233 Feb 11, 2025
e82d8bb
Add: odom subscriber, record params
wintera1233 Feb 11, 2025
71bd58a
Merge remote-tracking branch 'origin/ft-testBot' into devel
wintera1233 Feb 11, 2025
041e5de
Add: (testBot) ros launch in compose cmd
jossiewang Feb 11, 2025
2b42290
Merge branch 'devel' into ft-testBot
jossiewang Feb 11, 2025
29bcf39
Add: (testBot) pre-built docker image
jossiewang Feb 11, 2025
ec04b5d
Modified: (EKF) using initial pose
jossiewang Feb 12, 2025
03c48b2
Merge branch 'devel' into ft-testBot
jossiewang Feb 12, 2025
9b8ea90
Modified (testBot) use built image
jossiewang Feb 12, 2025
9969138
Fixed: rosbridge conflict with foxglove
jossiewang Feb 12, 2025
3e5c318
Add: (LiDAR) subscription to /set_lidar_side
jossiewang Feb 12, 2025
f75dddb
Merge pull request #23 from DIT-ROBOTICS/ft-testBot
jossiewang Feb 12, 2025
48bebc4
Add: (testBot) temp sol to sides setting
jossiewang Feb 12, 2025
71e3896
Merge branch 'devel' into ft-testBot
jossiewang Feb 12, 2025
4cbb9c5
Add: (TOOL) to use foxglove alongside bridge
jossiewang Feb 12, 2025
14acfb6
Merge remote-tracking branch 'origin/devel' into devel
wintera1233 Feb 12, 2025
84434f4
Fix: bag recording depending functions
wintera1233 Feb 12, 2025
1262b1c
Modified: right TF
wintera1233 Feb 12, 2025
efc4f4f
Add: link robot/map to global map
wintera1233 Feb 12, 2025
73135f9
Add: independent launch for lidar localizaton
wintera1233 Feb 12, 2025
8ba9d87
Merge pull request #22 from DIT-ROBOTICS/ft.local
wintera1233 Feb 12, 2025
bd8af39
Merge remote-tracking branch 'origin/devel' into devel
wintera1233 Feb 12, 2025
c721208
Modify: movement unit to meter, initial_pose
wintera1233 Feb 12, 2025
ad34c30
modified: apply camera
wintera1233 Feb 18, 2025
31e4013
modified: apply camera(1hz)
wintera1233 Feb 18, 2025
fe2abf7
modified: (testBot) port and image
jossiewang Feb 18, 2025
62003b8
modified: (rosserial) topic name and ttyUSB0
jossiewang Feb 18, 2025
56a8c44
Merge branch 'devel' into ft-testBot
jossiewang Feb 18, 2025
370605b
fix: (lidar_localization_pkg) launch path in setup
jossiewang Feb 18, 2025
b20d5b8
Fix: (local_filter) ensure include folder for git
jossiewang Feb 18, 2025
3d59d78
fix: (lidar) lidar launch in view_obstacles_launch
jossiewang Feb 18, 2025
840a1af
Modified: (ENV) build sensor-ws in stages
jossiewang Feb 18, 2025
3b8693d
modified: (odom) use duaiduai for now
jossiewang Feb 19, 2025
0d74188
modified: (launch) remap odoo -> driving
wintera1233 Feb 19, 2025
bbcacca
modified: (lidar) lidar orientation to base
jossiewang Feb 19, 2025
b7060bb
Merge branch 'devel' into ft-testBot
jossiewang Feb 19, 2025
b50be4a
modified: (ekf) ekf cov and theta
jossiewang Feb 20, 2025
52d33b7
Add: (launch) use local_filter
jossiewang Feb 20, 2025
c80c8f4
Modified: yellow.launch
jossiewang Feb 20, 2025
ebcac63
Fixed:(ekf) omni model orientation
jossiewang Feb 20, 2025
b823daa
Modified: (udev) /dev/lidar
jossiewang Feb 20, 2025
cf07161
Modified: udev name
jossiewang Feb 20, 2025
ddf7e88
Modified: (ENV) for dev port name
jossiewang Feb 20, 2025
95ecdaf
Modified: (ekf) update covariance formula
jossiewang Feb 27, 2025
64adbee
Modified: (udev) no need for usb.sh
jossiewang Feb 27, 2025
8feddfa
Modified:(lidar) obstacle extractor params
jossiewang Feb 27, 2025
e3b06de
Modified: (lidar) use TF to get predict @scantime
jossiewang Feb 27, 2025
be4dcdf
Add: (lidar) TF compensation for lidar_pose
jossiewang Feb 27, 2025
534cec8
fix: (local) timestamped
wintera1233 Mar 3, 2025
1812877
add: (ekf) create_timerr for Camera callback
wintera1233 Mar 3, 2025
59cc60d
fix: (local) topic type
wintera1233 Mar 3, 2025
f600c2a
modified: (docker) devel_ws branch
wintera1233 Mar 3, 2025
bb8aae9
modified: (local) init_covariance
wintera1233 Mar 3, 2025
58153e4
modified: (local) subscriber settings
wintera1233 Mar 3, 2025
04ccb57
Update rival_localization
mac781 Mar 3, 2025
d73465a
Modified: (ENV) ROS_DOMAIN_ID as environment var
jossiewang Mar 4, 2025
1c515c1
Fix: (ekf) camera timer
jossiewang Mar 4, 2025
e93dfcc
modified: (local) odomcoord sources
wintera1233 Mar 4, 2025
f206634
Add: (ENV) build dependencies
jossiewang Mar 6, 2025
2c9bc31
Merge branch 'devel' into testBot-release
jossiewang Mar 6, 2025
3ddd70d
modified: (ekf) tiny camera covariance
wintera1233 Mar 6, 2025
609b673
Add: (health_check) initial health_script
jossiewang Mar 10, 2025
396e233
modified: (ekf) turn the jacobian into an integral function
wintera1233 Mar 11, 2025
9e996fe
Merge branch 'devel' into ft.rival_localization
mac781 Mar 11, 2025
a9b6dc9
Merge pull request #26 from DIT-ROBOTICS/ft.rival_localization
jossiewang Mar 12, 2025
7292440
Deleted: (rival) draw_path package
jossiewang Mar 12, 2025
8a8aa63
Modified: (rival) mute imm_filter
jossiewang Mar 12, 2025
145a7a2
Removed: (local) param yaml (un-built, fix this!)
jossiewang Mar 12, 2025
91b1355
Modified: (lidar) obstacle_to_robot node name
jossiewang Mar 12, 2025
85a1785
Add: (launch) rival nodes
jossiewang Mar 12, 2025
4a18483
modified: (local) pose-> poseStamped
wintera1233 Mar 12, 2025
82bcf95
modified: (local) include path
wintera1233 Mar 12, 2025
5f7e5b8
modified: (local) include path
wintera1233 Mar 12, 2025
7ba5bc8
modified: (local) rererererecheck poseSTAMPED
wintera1233 Mar 12, 2025
e6dfb80
modified: (local) guess what i changed??
wintera1233 Mar 12, 2025
1eebd45
Modified: (rival) mute IMM model ratio
jossiewang Mar 12, 2025
2649c52
add: camera rival pose
wintera1233 Mar 12, 2025
a54f3ab
modified(rival): remove robot/frame
wintera1233 Mar 12, 2025
0c8bb3c
Fixed: (launch) integrated IMM in rival_loc.
jossiewang Mar 13, 2025
047f77e
Modified: (ENV) compose for 'devel'
jossiewang Mar 13, 2025
a53ccab
Modified: (TOOL) record.launch
jossiewang Mar 13, 2025
7708e19
add: (comm) subs to /odoo & advs /cmd_Vel
wintera1233 Mar 13, 2025
b33f126
modified: (ekf) process noise of w
wintera1233 Mar 13, 2025
3f197d1
modified: (lidar) remove nomalizer
wintera1233 Mar 13, 2025
17038c5
modified: (local) subs to odoo
wintera1233 Mar 14, 2025
0039ca7
add: (ekf) small angular velocity approximation
wintera1233 Mar 14, 2025
2e80088
Fixed: (ekf) residual error for +- angle
jossiewang Mar 16, 2025
181f1d7
Modified: (ekf) if were to bound P
jossiewang Mar 17, 2025
ccc5beb
Fixed: (lidar) for reasonable P_pred in our case
jossiewang Mar 17, 2025
0d0f8f1
Merge remote-tracking branch 'upstream/ft.rival_localization' into devel
jossiewang Mar 17, 2025
cb20629
Merge pull request #27 from DIT-ROBOTICS/devel
jossiewang Mar 17, 2025
1bebd40
add: (ekf) covariance threshold params
wintera1233 Mar 17, 2025
b2129ab
modified: (ekf) threshold for covariance
wintera1233 Mar 17, 2025
ff995c5
modified: (blue) threshold cov
wintera1233 Mar 17, 2025
609a29e
Modified: (rival) default param value
jossiewang Mar 17, 2025
2c3f10c
Add: (rival) camera and obs fusion
jossiewang Mar 17, 2025
a3c90f5
Modified: (lidar) obstacle radius and some parameters
jossiewang Mar 17, 2025
f6a0327
Fixed: (rival) subscribe and callback in header
jossiewang Mar 17, 2025
de99632
Merge branch 'ft-health_script' into devel
jossiewang Mar 17, 2025
d4a68e6
Fixed: (ekf) param and initialization
jossiewang Mar 18, 2025
aede910
Fixed: (lidar) obstacle enlargement (float)
jossiewang Mar 18, 2025
3da0b0c
Fixed: (launch) syntac
jossiewang Mar 18, 2025
25257e6
Merge branch 'devel' into Release
jossiewang Mar 18, 2025
b6cf863
modified: (ekf) global transform stamped
jossiewang Mar 18, 2025
ae900ec
Merge pull request #28 from DIT-ROBOTICS/ft-camera4rival
jossiewang Mar 19, 2025
022ae3b
Fixed: (ekf) bug with static transform init
jossiewang Mar 19, 2025
a50cbbc
Add: (ekf) use_cam as param
jossiewang Mar 19, 2025
f195385
Add: (lidar) visualize chosen_landmarks
jossiewang Mar 19, 2025
62e011e
Modified: (launch) bag_test
jossiewang Mar 19, 2025
3eb87e2
Modified: (launch) add use_cam param
jossiewang Mar 19, 2025
8d04a87
Fixed: (lidar) chosen landmark visualization
jossiewang Mar 19, 2025
d46e311
removed: unused TF include
wintera1233 Mar 20, 2025
437cc7b
Fixed: (lidar) use CROSS to distinguish a & b
jossiewang Mar 20, 2025
5b62faf
Modified: (launch) initialpose w/o underline
jossiewang Mar 20, 2025
1ccab29
Merge remote-tracking branch 'upstream/devel' into Release
jossiewang Mar 27, 2025
b39a960
Removed: ros1 workspace
jossiewang Apr 28, 2025
454e824
Add: (obstacle) source code
jossiewang Apr 28, 2025
3fe9395
Add: (env) .env and profiles
jossiewang Apr 28, 2025
94ff7f4
Add: (lidar calibraiton) publish beacons
jossiewang Apr 28, 2025
4754575
Add: test for features
jossiewang Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.vscode
bag/

# ROS #
#######
build/
install/
log/

# Python #
##########
*.pyc
*.pyo
__pycache__/
1 change: 1 addition & 0 deletions docker/local-ros2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
# ros-humble-laser-geometry \
libsuitesparse-dev \
ros-humble-libg2o \
ros-humble-rmw-cyclonedds-cpp\
# ros-humble-imu-tools \
libusb-1.0-0 libusb-1.0-0-dev -y && \
rm -rf /var/lib/apt/lists/*
Expand Down
14 changes: 14 additions & 0 deletions docker/local-ros2/OdomComm/_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

## 1. make scripts & library executable
echo "=== [COMMUNICATION] ==="
find ../OdomComm -type f -name "*.sh" -exec sudo chmod +x {} \;

## 2. environment setup
export DISPLAY=:0
xhost +local:docker
cd docker

## 3. deployment
echo "[COMMUNICATION] Deploying..."
docker compose -p communication up -d
22 changes: 22 additions & 0 deletions docker/local-ros2/OdomComm/build_and_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

## 0. clean container within same group
echo "=== [COMMUNICATION] Build & Run ==="
echo "[COMMUNICATION] Remove Containers ..."
docker compose -p communication down --volumes --remove-orphans

## 1. make scripts & library executable
find ../OdomComm -type f -name "*.sh" -exec sudo chmod +x {} \;

## 2. environment setup
export DISPLAY=:0
xhost +local:docker
cd docker

## 3. build image
echo "[COMMUNICATION] Building..."
docker compose -p communication build

## 4. deployment
echo "[COMMUNICATION] Deploying..."
docker compose -p communication up -d
151 changes: 151 additions & 0 deletions docker/local-ros2/OdomComm/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
################################################################################################
# - Base stage
# - This stage serves as the foundational stage for all other stages.
# - Base image: Ubuntu 22.04 Jammy Jellyfish
# - https://hub.docker.com/_/ubuntu/tags?page=1&name=22.04
################################################################################################

FROM ubuntu:22.04 AS base

LABEL org.opencontainers.image.authors="yuzhong1214@gmail.com"

# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#set-locale
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8

SHELL ["/bin/bash", "-c"]

# Add user
RUN useradd -ms /bin/bash user

################################################################################################
# - Build stage
# - In this stage, I will build ROS Humble and ros1-bridge from source.
# - Reference:
# - https://docs.ros.org/en/humble/How-To-Guides/Using-ros1_bridge-Jammy-upstream.html
# - https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html
################################################################################################

FROM base AS build

# Install the required packages for the following command.
RUN apt-get update && \
apt-get install -y \
curl \
locales \
software-properties-common \
lsb-release

# Set locale.
# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#set-locale
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

# Add the ROS 2 apt repository.
# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#add-the-ros-2-apt-repository
RUN add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null

# Install development tools and ROS tools.
# Note that we declare noninteractive mode to avoid apt asking for user input.
# Additionally, install colcon from PyPI, rather than using apt packages.
# Reference: https://docs.ros.org/en/humble/How-To-Guides/Using-ros1_bridge-Jammy-upstream.html#install-development-tools-and-ros-tools
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
git \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pip \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-setuptools \
ros-dev-tools
RUN python3 -m pip install -U colcon-common-extensions vcstool

# Create ros2_humble workspace, and clone all repositories from the list.
# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#get-ros-2-code
RUN mkdir -p /ros2_humble/src
WORKDIR /ros2_humble
RUN vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src

# Install dependencies.
# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#install-dependencies-using-rosdep
RUN rosdep init && \
rosdep update && \
rosdep install --from-paths src --ignore-src -y --rosdistro humble --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"

# Build the ros2_humble workspace. (This will take a few minutes)
# Note that we are using colcon build without the flag --symlink-install.
# This is because we will copy the built files from the build stage to the release stage.
# If we use the flag --symlink-install, the release stage will not be able to find the built files.
# Reference: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#build-the-code-in-the-workspace
RUN colcon build

# Delete packages.ros.org from sources.list and remove conflicts packages manually.
# Removing those conflicts packages is necessary for install ros-core-dev.
# Here is the dicussion about this issue: https://github.com/j3soon/ros2-essentials/pull/9#discussion_r1375303858
# Reference:
# - https://docs.ros.org/en/humble/How-To-Guides/Using-ros1_bridge-Jammy-upstream.html#ros-2-via-debian-packages
# - https://github.com/osrf/docker_images/issues/635#issuecomment-1217505552
RUN rm -rf /etc/apt/sources.list.d/ros2.list && \
apt-get remove -y \
python3-catkin-pkg \
python3-catkin-pkg-modules

# Install ROS 1 from Ubuntu packages.
# Reference: https://docs.ros.org/en/humble/How-To-Guides/Using-ros1_bridge-Jammy-upstream.html#install-ros-1-from-ubuntu-packages
RUN apt-get update && \
apt-get install -y ros-core-dev

# Build ros1_bridge from source.
# Reference: https://github.com/ros2/ros1_bridge/tree/3d5328dc21564d2130b4ded30afe5cd1c41cf033#building-the-bridge-from-source
RUN git clone https://github.com/ros2/ros1_bridge src/ros1_bridge
RUN source install/setup.bash && \
colcon build --packages-select ros1_bridge --cmake-force-configure

# Other configurations
COPY ./start-bridge.sh /start-bridge.sh
RUN chmod +x /start-bridge.sh

CMD ["/bin/bash"]

################################################################################################
# - Release stage
# - In this stage, I will copy the built files from the build stage.
# This is useful for reducing the size of the image.
# - Reference:
# - https://docs.docker.com/build/building/multi-stage/
################################################################################################

FROM base AS release

# Install ROS core and packages with their dependencies.
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libspdlog-dev \
python3-packaging \
ros-core-dev

# Copy files from host and build stage
COPY --from=build /ros2_humble/install /ros2_humble/install

# Other configurations
COPY ./start-bridge.sh /start-bridge.sh
USER user
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc

WORKDIR /
CMD ["./start-bridge.sh"]
55 changes: 55 additions & 0 deletions docker/local-ros2/OdomComm/docker/Dockerfile-rosserial
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
################################################################################################
# - Base stage
# - This stage serves as the foundational stage for all other stages.
# - Base image: OSRF ROS noetic Desktop Full
# - https://hub.docker.com/r/osrf/ros/tags?page=1&name=noetic-desktop-full
################################################################################################

FROM osrf/ros:noetic-desktop-full AS base

LABEL org.opencontainers.image.authors="yoseph.huang@gmail.com"

ARG USERNAME=user
ARG USER_UID=1000
ARG USER_GID=$USER_UID

SHELL ["/bin/bash", "-c"]


################################################################################################
# - User Setup stage
# - In this stage, create a non-root user and configure passwordless sudo.
################################################################################################

FROM base AS user-setup

## Create a non-root user
RUN groupadd --gid $USER_GID $USERNAME && \
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash && \
apt-get update && \
apt-get install -y sudo && \
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
rm -rf /var/lib/apt/lists/*

FROM user-setup AS catkin

USER ${USERNAME}
# COPY comm-ws /home/$USERNAME/comm-ws
RUN mkdir -p /home/$USERNAME/ws/src
COPY odometry /home/$USERNAME/ws/src/odometry

# catkin_make
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && \
rosdep update && \
cd /home/$USERNAME/ws && \
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro noetic && \
catkin_make"

FROM catkin AS final

COPY odometry/odometry/launch /home/$USERNAME/ws/src/odometry/launch

## Final configurations
USER $USERNAME
CMD ["/bin/bash"]
29 changes: 29 additions & 0 deletions docker/local-ros2/OdomComm/docker/compose-serial.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
services:
ros1:
image: ros1:serial
container_name: ros1
stdin_open: true
tty: true
network_mode: host
privileged: true
volumes:
# - ../comm-ws:/root/comm-ws
# - /dev/bus/usb:/dev/bus/usb
- /dev:/dev
stop_grace_period: 1s
# depends_on:
# ros-core:
# condition: service_healthy
# command: /bin/bash -c "
# chmod +x /root/comm-ws/devel/_setup_util.py &&
# find /root/comm-ws/devel -type f -name '*.sh' -exec chmod +x {} \; &&
# source /opt/ros/noetic/setup.bash &&
# source /root/comm-ws/devel/setup.bash &&
# cd /root/comm-ws &&
# sudo chmod 777 /dev/ttyACM0 &&
# roslaunch rosserial_server stm32.launch"
command: /bin/bash -c "
source /opt/ros/noetic/setup.bash &&
source ~/ws/devel/setup.bash &&
sudo chmod 777 /dev/ttyACM0 &&
roslaunch odometry odometry_comm.launch"
Loading