Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
366 commits
Select commit Hold shift + click to select a range
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
a08d18a
Add: calibration_lidar
wintera1233 Mar 24, 2025
3dfd094
modified: port- ttyUSB0
wintera1233 Mar 24, 2025
080aee6
add: obstacle pose
wintera1233 Mar 26, 2025
73d8cb5
Add: radius compensation
wintera1233 Mar 26, 2025
c19105d
modified: beacon radius
wintera1233 Mar 26, 2025
fd9c7c4
Add: single lidar triangular localization
wintera1233 Mar 27, 2025
1ccab29
Merge remote-tracking branch 'upstream/devel' into Release
jossiewang Mar 27, 2025
d08305f
add: compensation factor method
wintera1233 Mar 31, 2025
7124e3a
modified: tiny change(laser parent frame, domainID)
wintera1233 Mar 31, 2025
c50991e
add: vector analizz
wintera1233 Apr 2, 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
b0a9d1c
Fixed: customize visualization of obstacles
jossiewang Apr 28, 2025
4754575
Add: test for features
jossiewang Apr 28, 2025
5cff2e1
Add: TF for deadwheel&imu @ odom
wintera1233 Apr 28, 2025
9731ecd
Add: odomTF profile for Test3
wintera1233 Apr 28, 2025
0512f89
Add: (lidar) obstacle visualization
jossiewang Apr 29, 2025
b72039b
Modified: (lidar) likelihood related param
jossiewang Apr 29, 2025
2ce6f91
Update:(obstacle detector) distortion correction
yjHuang251 Apr 29, 2025
6758fb0
Merge remote-tracking branch 'upstream/ft.FixObstacleCPU' into ft.dis…
yjHuang251 Apr 29, 2025
99c7d34
Fix: lost parentheses
yjHuang251 Apr 29, 2025
08da726
modified: TF Odom, init()
wintera1233 Apr 29, 2025
c8f4948
Modify: remove translation correction
yjHuang251 Apr 29, 2025
99c1684
modified: compose[profile]
wintera1233 Apr 29, 2025
f6e5244
Modified: topic recording set
wintera1233 Apr 30, 2025
141fc76
Modified: ekf param, removed unused variables
wintera1233 Apr 30, 2025
0295031
Modified: initial_pose(remap to initialpose)
wintera1233 Apr 30, 2025
7ed6e11
Merge branch 'ft.LiDAR_Visualization' into Develop
jossiewang Apr 30, 2025
4bef59c
Merge branch 'ft.odomTF' into Develop
wintera1233 Apr 30, 2025
5484372
Modified: main-profile image(OdomTF)
wintera1233 Apr 30, 2025
fff7b4e
Modified: (param) ekf q and lidar likelihood threhold
jossiewang Apr 30, 2025
4b68e0f
Modified: (param) lidar P_pred
jossiewang Apr 30, 2025
f979324
Merge pull request #37 from DIT-ROBOTICS/ft.distortion-correction-2
yjHuang251 Apr 30, 2025
03a3e0f
Modified: (env) use image 'Develop'
jossiewang May 2, 2025
1cfae3f
Modified: (ekf) default initial pose [0.4, 1.7, 0]
jossiewang May 2, 2025
1995426
Add: (healthcheck) package with slip estimator
jossiewang May 2, 2025
ee40843
Modified: (healthcheck) slip estimator use odom2map
jossiewang May 3, 2025
239159d
Add: (healthcheck) concept on healthreport
jossiewang May 3, 2025
cf13686
Fix: (env) build and run
jossiewang May 3, 2025
fa97bca
Add: compose profile [HealthCheck]
wintera1233 May 3, 2025
afa1f95
modified: TF include source
wintera1233 May 3, 2025
7de20f7
Add: init_check& camera listener
wintera1233 May 5, 2025
ce419a4
Add: (healthcheck) save healthcheck report to file
jossiewang May 6, 2025
84b01ba
Modified:(healthcheck) slip estimation (match time)
jossiewang May 6, 2025
afcda74
Fix: (obstacle) header .hpp instead of .cpp
jossiewang May 6, 2025
eba35a2
Modified: (obs) headerfile
wintera1233 May 7, 2025
cf4b81c
Add: (lidar) topic for lidar param
jossiewang May 7, 2025
5a746da
Merge branch 'ft.HealthCheck' into Develop
wintera1233 May 7, 2025
42da867
Add: running_launch python
wintera1233 May 7, 2025
4b07b79
Add: RunStarter profile
wintera1233 May 7, 2025
2892088
Modified: (RPlidar) use 'Standard' mode
jossiewang May 8, 2025
de1beac
Fix: (launch) healthcheck python launch
jossiewang May 8, 2025
58a5191
Modified:(tool) do not use packages-select
jossiewang May 8, 2025
fca6c57
Fix:(lidar) parent frame for beacons_gua
jossiewang May 8, 2025
2169c63
Merge commit 'fca6c574b817a748d5a5c1fe49bbc2a1e325cc10' into ft.wholerun
jossiewang May 8, 2025
bcd6c02
Fix: (launch.py) some typo
jossiewang May 8, 2025
eaec40e
Merge branch 'ft.wholerun' into ft.lidar_dynamic_param
jossiewang May 8, 2025
fa73879
Modified:(ekf) fast_spin and refresh area
jossiewang May 8, 2025
7d594f4
Modified: (launch_py) use TimerAction
wintera1233 May 8, 2025
3c1e6e9
Fix:(ekf) setup.py for sym-link
jossiewang May 9, 2025
4a25b5c
Fix: (lidar) setup.py for symlink
jossiewang May 9, 2025
d93ce24
Modified:(obstacle) min_point & visibles
jossiewang May 9, 2025
81e2d83
Fix: (env) symlink and rm old built stuff
jossiewang May 9, 2025
f358e05
Update: (obstacle) tail eliminatation
yjHuang251 May 9, 2025
770ddc0
Modify: remove total number restriction
yjHuang251 May 9, 2025
6773cd5
Fix: (healthcheck) odom_init condition
jossiewang May 9, 2025
3b0a339
Modify: tail eliminator ver2
yjHuang251 May 9, 2025
80fcc8f
Modify: reset arguments
yjHuang251 May 9, 2025
690680f
Modify: tail threshold
yjHuang251 May 10, 2025
948aa6c
Add: middle iterator
yjHuang251 May 10, 2025
ff4ca42
Modify: pass input point to tail elimination
yjHuang251 May 10, 2025
286b575
Revert "Modify: pass input point to tail elimination"
yjHuang251 May 10, 2025
ca6ccdb
Revert "Revert "Modify: pass input point to tail elimination""
yjHuang251 May 10, 2025
cdf1663
Modify: remove point list parameter
yjHuang251 May 10, 2025
7af754c
Add: localization-ok check
wintera1233 May 10, 2025
cc4ff7e
Modify: tail elimination to detect circles
yjHuang251 May 10, 2025
e1a32d6
Merge branch 'Develop' into ft.wholerun
jossiewang May 12, 2025
5e73f0f
Merge branch 'ft.lidar_dynamic_param' into ft.wholerun
jossiewang May 12, 2025
c2b4c43
Add: (lidar) obs prob param, and local compensate
jossiewang May 12, 2025
de0ac7e
Add: (healthcheck) refresh & log broken odom in file
jossiewang May 13, 2025
e759a0e
Add: (healthcheck & lidar) lidar_param
jossiewang May 13, 2025
90d60c4
Modifed: outer /initialpose between nodes /inital_pose
wintera1233 May 13, 2025
ffa19b2
Merge branch 'ft.wholerun' into ft.refresh&lidarParam
jossiewang May 13, 2025
d93f230
Modified: (healthcheck) revert to runningn param
jossiewang May 13, 2025
009c908
Fix:(healthcheck) logic, topic, single local
jossiewang May 13, 2025
9decfe6
Modified: remap initalpose->initial_pose
wintera1233 May 13, 2025
8e2effd
Add: comma
wintera1233 May 13, 2025
36e59e8
Modified: camera_msg->PoseStamped, angle normalizer, check final freq=1
wintera1233 May 14, 2025
76a5bd2
Modified: (eliminator)magical nuance
wintera1233 May 15, 2025
a93cac1
Merge branch 'ft.refresh&lidarParam' into ft.tail-eliminator
wintera1233 May 15, 2025
20c4428
Removed: taileliminator in circle detector
wintera1233 May 15, 2025
179aec0
Add: (healthcheck-checkfinal) timestampcheck
wintera1233 May 15, 2025
7875296
Add: YDLiDAR dependency
wintera1233 May 17, 2025
317a491
Add: .gitignore
wintera1233 May 17, 2025
cbf9760
Removed: lidar drivers in devel-ws
wintera1233 May 17, 2025
8c143f0
Merge branch 'ft.calibration_lidar' into ft.YDLiDAR
wintera1233 May 17, 2025
42253a3
Modified: communicationQOS, param for YDLiDAR, launch
wintera1233 May 17, 2025
b2e4a71
aDD: (CALibrtor) publishing err for record
wintera1233 May 17, 2025
3909302
Add: ready callback(calibrator)
wintera1233 May 18, 2025
444527d
Modified: (ydlidar) calibration
jossiewang May 18, 2025
25b66cf
Fix: config for 11
wintera1233 May 18, 2025
ca4c657
Stage- 0519@11-check_Chassis
wintera1233 May 18, 2025
317c64a
Modified: (11-launch)
jossiewang May 19, 2025
b70096b
Add: (ekff) angle normalizer
wintera1233 May 19, 2025
cdace29
Add: (health) check IMU input
wintera1233 May 19, 2025
4553f09
Add: (gitignore) health report
jossiewang May 20, 2025
743a01a
modified: ldiar_angle, container name
wintera1233 May 21, 2025
a011b36
modified: robot obs radius, ignore health reports
wintera1233 May 21, 2025
4a35705
ADD: rival_localizaton with fixed lidar@11
wintera1233 May 21, 2025
67c3284
Modified: rival/final_pose -> rhino_pose
wintera1233 May 21, 2025
e13f452
Update: (healthcheck) ready signal class
yjHuang251 May 21, 2025
1143a67
Update: (healthcheck) send start signal to main
yjHuang251 May 21, 2025
13cd33c
Merge remote-tracking branch 'upstream/YD@11' into ft.ReadySignal
yjHuang251 May 22, 2025
44aa736
Modified: (launch)
jossiewang May 23, 2025
1bd026b
Add: (healthcheck) sensor check
jossiewang May 23, 2025
26418f2
Modified: (env, ekf, ignore) normalize angle
jossiewang May 23, 2025
cc62cc6
Add: poseArray obs to map
wintera1233 May 23, 2025
1d7050e
Add: (lidar) param lidar_multiplier
jossiewang May 23, 2025
34b32a2
Modified:(Racoon) laser frame angle
jossiewang May 23, 2025
226b2a6
Fix: (healthcheck) ready signal initialization
yjHuang251 May 23, 2025
a5e96db
Add: (healthcheck) some logger info
yjHuang251 May 23, 2025
ec089dd
Add: (side lidar, env)
jossiewang May 24, 2025
01849f0
Add: (rival_localization) fusion with side lidar
jossiewang May 24, 2025
b373bc3
Fix: (lidar) obstacle frame base_footprint
jossiewang May 24, 2025
43b805b
Merge branch 'ft.YDLiDAR' into Raccoon
jossiewang May 24, 2025
c05a4f0
Modified: (lidar) port -> /dev/lidar
jossiewang May 24, 2025
d04edbd
Merge branch 'ft.YDLiDAR' into Raccoon
jossiewang May 24, 2025
e057ee7
Fix: (rival) missing include
jossiewang May 24, 2025
9115fc4
Add: 2beacon function
wintera1233 May 24, 2025
53b9bc9
Modifed: side_lidar frame& scantopic
wintera1233 May 24, 2025
60a300b
Merge branch 'ft.newrival' into Raccoon
wintera1233 May 24, 2025
29034be
Move: rival_localization param direct in launch
wintera1233 May 24, 2025
b5407b4
ADD: (healthcheck) ready signal logger for debugging
yjHuang251 May 24, 2025
628bab9
Add: (lidar) two beacons
jossiewang May 24, 2025
573174f
Merge branch 'ft.2beacons' into Raccoon
jossiewang May 24, 2025
866a3c5
Update: custom_interfaces for Start upSrv
yjHuang251 May 24, 2025
8523392
Add: (health) read initial pose from button.json
jossiewang May 24, 2025
f401eab
Modified: (pose_array, image) master image
wintera1233 May 24, 2025
976cf5c
modified: (rival) params, loginfo
wintera1233 May 24, 2025
44aca82
Fix: interface package same as main
yjHuang251 May 24, 2025
7bcc018
Fix: subscription add qos depth
yjHuang251 May 24, 2025
fa2b41a
modifed: (side_commu) ethDDS
wintera1233 May 24, 2025
bbc7061
Add: initial pts
wintera1233 May 24, 2025
629c7d2
Modified: (launch,image) param in launch, master
wintera1233 May 24, 2025
16977c7
Modify: add ready signal timer
yjHuang251 May 24, 2025
e2ce157
Fix: (button) volume, ekf log, launch sequence
jossiewang May 25, 2025
b6c0668
Merge branch 'ft.ButtonSignal' into Raccoon
jossiewang May 25, 2025
5da3d35
Modified: (Raccoon) laser frame
jossiewang May 25, 2025
742c61d
Modify: is main ready judement in sendReadySignal
yjHuang251 May 25, 2025
46df92d
Fix: (button) launch ekf ealier than healthcheck
jossiewang May 25, 2025
88c44e8
Modified: (button) no. 13 init for Raccoon
jossiewang May 25, 2025
30c0f02
remappings (rival, robot cam)
wintera1233 May 25, 2025
5f11361
fix: syntax err
wintera1233 May 25, 2025
ef482c9
Add: ready signal template as a node
yjHuang251 May 25, 2025
eab3a7a
fixed: comma
wintera1233 May 25, 2025
985552b
fix: syntax err
wintera1233 May 25, 2025
f752227
Merge branch 'Panda' into ft.ReadySignal
wintera1233 May 25, 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
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.vscode
bag/
report/

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

# Python #
##########
*.pyc
*.pyo
__pycache__/
localization-devel-ws/ydlidar_ros2_driver
localization-devel-ws/YDLidar-SDK
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