Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c0da8ec
Fix symbol file typo
NoahR-ATC Jun 30, 2026
38c9bde
Added DBC export to umrt_can_definitions
NoahR-ATC Jun 30, 2026
7ae0d11
Set up to compile ros2_j1939_babbler with our CAN symbols baked in
NoahR-ATC Jun 30, 2026
9b16192
Update babbler
NoahR-ATC Jun 30, 2026
3d8eefb
Use bash for dockerfile runs
NoahR-ATC Jun 30, 2026
d9f137f
Different approach to building
NoahR-ATC Jul 1, 2026
7a6596f
Update babbler
NoahR-ATC Jul 1, 2026
671f17e
Try new docker build workflow
NoahR-ATC Jul 2, 2026
a20bad0
Update babbler
NoahR-ATC Jul 2, 2026
8f7625a
Debugging
NoahR-ATC Jul 3, 2026
9d6cfc6
Got umrt-build working, now update dev image
NoahR-ATC Jul 3, 2026
f8995c2
Test loading sym instead of dbc into babbler
NoahR-ATC Jul 6, 2026
67ba7d9
Added output of stripped sym file to umrt-can-definitions so I can us…
NoahR-ATC Jul 6, 2026
0a1788f
Fix Linux permissions on script
NoahR-ATC Jul 6, 2026
35dbd9e
Load stripped file into babbler
NoahR-ATC Jul 6, 2026
76dc2c9
Update babbler to properly generate floating point signals
NoahR-ATC Jul 6, 2026
5b02a80
Update babbler to fix bad encoding in static bridge
NoahR-ATC Jul 15, 2026
896ff0f
Include Python definitions in build image
NoahR-ATC Jul 22, 2026
17b2df1
Merge remote-tracking branch 'origin/main' into babbler
NoahR-ATC Jul 25, 2026
f7cb41a
Update babbler to fix dependency
NoahR-ATC Jul 25, 2026
4c01800
Switch to stable babbler version
NoahR-ATC Jul 28, 2026
cdb5697
Switch to babbler version with arm64 fix
NoahR-ATC Aug 3, 2026
803cdb5
Switch to stable build workflow
NoahR-ATC Aug 3, 2026
c5e3c19
Use right babbler version
UMRoboticsTeamAdmin Aug 4, 2026
b8ddd59
Update babbler
UMRoboticsTeamAdmin Aug 4, 2026
b45f879
Update babbler
UMRoboticsTeamAdmin Aug 4, 2026
9d28503
Add Soil_Sensor CAN message definition
e-gonzales Aug 5, 2026
c67884c
Update Dockerfile
edcela Aug 7, 2026
bbd438d
Add iproute2 package
Backback12 Aug 7, 2026
75dc41c
Update publish.yaml
Backback12 Aug 7, 2026
b0af211
Merge pull request #50 from UMRoboticsTeam/babbler
edcela Aug 7, 2026
ec17ee1
Update Dockerfile
edcela Aug 8, 2026
4625387
Update version
edcela Aug 8, 2026
17f1e3f
Merge pull request #51 from UMRoboticsTeam/edcela-patch-1
edcela Aug 8, 2026
078a389
Update version
Backback12 Aug 8, 2026
4df9808
Update Dockerfile and version
edcela Aug 8, 2026
8e9aba9
Merge pull request #53 from UMRoboticsTeam/update
edcela Aug 8, 2026
a14e6fa
Merge branch 'main' into soil_sensor
e-gonzales Aug 8, 2026
317d491
Merge pull request #49 from UMRoboticsTeam/soil_sensor
e-gonzales Aug 8, 2026
f9e069d
Update version
Backback12 Aug 8, 2026
a4d946f
Merge branch 'main' into comms-vlans
Backback12 Aug 8, 2026
501a5da
change to dockerfile
Samara103 Aug 8, 2026
e38ebd2
Merge pull request #55 from UMRoboticsTeam/usb-cam2
Samara103 Aug 8, 2026
3e9dd13
change to dockerfile
Samara103 Aug 8, 2026
289a10b
update version
edcela Aug 8, 2026
f7145df
Merge branch 'main' into comms-vlans
edcela Aug 8, 2026
fe85455
update version
edcela Aug 8, 2026
95a5403
Merge pull request #52 from UMRoboticsTeam/comms-vlans
edcela Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
image_name: umroboticsteam/umrt-build-dev
dockerfile: umrt-build-dev.Dockerfile
docker_build_args: "UMRT_BUILD_IMAGE_ID=${{ needs.build-umrt-build.outputs.image_tag }}"
docker_build_args: "UMRT_BUILD_IMAGE_ID=ghcr.io/umroboticsteam/umrt-build@${{ needs.build-umrt-build.outputs.image_tag }}"
tag_repo_with_version: false
secrets:
APT_SERVER_NAME: raw.githubusercontent.com
Expand Down
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ros:humble-ros-base

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

RUN echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/umrt.asc] https://raw.githubusercontent.com/UMRoboticsTeam/umrt-apt-repo/main/ humble main" > /etc/apt/sources.list.d/umrt_source.list

RUN --mount=type=secret,id=apt_auth_conf,target=/etc/apt/auth.conf.d/umrt.conf --mount=type=secret,id=apt_pubkey,target=/etc/apt/keyrings/umrt.asc,mode=0644 \
Expand Down Expand Up @@ -27,6 +29,7 @@ RUN --mount=type=secret,id=apt_auth_conf,target=/etc/apt/auth.conf.d/umrt.conf -
ros-humble-ros2-controllers \
ros-humble-moveit \
ros-humble-ublox-dgnss \
ros-humble-usb-cam \
ros-humble-foxglove-msgs \
ros-humble-foxglove-compressed-video-transport \
ros-humble-depthai-v3 \
Expand All @@ -45,20 +48,27 @@ RUN --mount=type=secret,id=apt_auth_conf,target=/etc/apt/auth.conf.d/umrt.conf -
ros-humble-joint-state-publisher \
ros-humble-aruco-opencv \
ros-humble-libstatistics-collector \
ros-humble-ros-babel-fish \
openframeworksarduino=0.0.3 \
umrt-imu-interface=0.0.4 \
umrt-geiger-interface=0.1.3 \
umrt-arm-firmware-lib=0.5.0 \
ros-humble-umrt-project-perry-description=0.0.9-0jammy \
umrt-arm-encoder-driver=2.0.0 \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN sudo pip3 install cantools

COPY . /ws
COPY src /ws/src
COPY Messages.sym /ws
COPY version /ws

RUN cd /ws/src && git clone https://github.com/UMRoboticsTeam/ros2_j1939_babbler.git && cd ros2_j1939_babbler && \
git checkout v0.2.4

RUN cd /ws/src && ./build_scripts.sh

RUN sudo rm -rf /src
RUN sudo rm -rf /src /ws

RUN sudo rm -f /etc/apt/sources.list.d/umrt_source.list
13 changes: 11 additions & 2 deletions Messages.sym
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ IDMask=FFFF00h
{ENUMS}
Enum=Assigned_Source_Addresses(128="ROS Controller", 104="CAN-PPM Gateways", 105="CAN-PPM Gateways",
106="CAN-PPM Gateways", 107="CAN-PPM Gateways", 108="CAN-PPM Gateways", 109="CAN-PPM Gateways",
110="CAN-PPM Gateways", 111="CAN-PPM Gateways", 236="Embedded Controller")
110="CAN-PPM Gateways", 111="CAN-PPM Gateways", 236="Embedded Controller", 96="Soil Sensor (ESP32)")
Enum=Battery_Charge_State(0="Stationary", 1="Charging", 2="Discharging")
Enum=Balance_State(0="Closed", 1="Open")

Expand Down Expand Up @@ -194,7 +194,7 @@ Var=Dischg_Over_Temp_Fault bit 12,1 /u:bool
Var=Dischg_Over_Temp_Critical_Fault bit 13,1 /u:bool
Var=Dischg_Under_Temp_Fault bit 14,1 /u:bool
Var=Dischg_Under_Temp_Critical_Fault bit 15,1 /u:bool
Var=Charge_Over_Curr_Fault_ bit 16,1 /u:bool
Var=Charge_Over_Curr_Fault bit 16,1 /u:bool
Var=Charge_Over_Curr_Critical_Fault bit 17,1 /u:bool
Var=Dischg_Over_Curr_Fault bit 18,1 /u:bool
Var=Dischg_Over_Curr_Critical_Fault bit 19,1 /u:bool
Expand Down Expand Up @@ -307,3 +307,12 @@ ID=00980140h
Type=Extended
Len=8
Var=Reserved raw 0,64

[Soil_Sensor]
ID=18FFEB00h
Type=Extended
Len=8
Var=Soil_Temperature signed 0,16 /u:degC /f:0.1 /min:-40 /max:85
Var=Soil_Moisture signed 16,16 /u:% /f:0.1 /min:0 /max:100
Var=Soil_EC signed 32,16 /u:uS/cm /f:0.1 /min:0 /max:3276.7
Var=Soil_PH signed 48,16 /u:pH /f:0.1 /min:0 /max:14
12 changes: 11 additions & 1 deletion src/build_scripts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/bash
set -e

# Compile and install umrt-can-definitions
cd umrt-can-definitions
Expand All @@ -9,6 +10,15 @@ cpack -G DEB

apt install -y ./output-packages/*.deb
cd ../
rm -r build
rm -rf build
cd ../

# Compile and install ros2_j1939_babbler with our symbol definitions baked in
cd ros2_j1939_babbler
source /opt/ros/humble/setup.bash
colcon build --event-handlers console_direct+ --merge-install --install-base ./build-output --cmake-args -DDBC_PATH=/opt/umrt-can-definitions/share/umrt-can-definitions/Messages.stripped.sym
rm -r ./build-output/share/colcon-core
cp -r ./build-output/share/* /opt/ros/humble/share/
cp -r ./build-output/lib/* /opt/ros/humble/lib/
cp -r ./build-output/include/* /opt/ros/humble/include/
cp -r ./build-output/local/lib/python3.10/dist-packages/* /opt/ros/humble/local/lib/python3.10/dist-packages/
17 changes: 13 additions & 4 deletions src/umrt-can-definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
cmake_minimum_required(VERSION 3.22.1)
project(umrt-can-definitions)

set(SYMBOL_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Messages.sym")
set(SYMBOL_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Messages.sym" CACHE STRING "Symbol file to read for message definitions")
set(GENERATED_CODE_BASENAME "messages")
set(Python3_EXECUTABLE python3)

set(GENERATED_CODE_FOLDER ${CMAKE_CURRENT_BINARY_DIR})
set(GENERATED_HEADER ${GENERATED_CODE_FOLDER}/${GENERATED_CODE_BASENAME}.h)
set(GENERATED_SOURCE ${GENERATED_CODE_FOLDER}/${GENERATED_CODE_BASENAME}.c)
set(STRIPPED_SYMBOL_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/Messages.stripped.sym)
set(DBC_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/Messages.dbc)

# ********** Setup CMake **********

Expand All @@ -32,9 +35,15 @@ endif()
# If symbol file is a symlink, get the absolute real path
get_filename_component(RESOLVED_SYMBOL_FILE "${SYMBOL_FILE}" REALPATH)

execute_process(
COMMAND ./strip_sym_file.sh
"${RESOLVED_SYMBOL_FILE}" "${STRIPPED_SYMBOL_FILE_PATH}"
)

execute_process(
COMMAND ./generate_definitions_from_sym.sh
"${RESOLVED_SYMBOL_FILE}" "${GENERATED_CODE_BASENAME}" "${GENERATED_CODE_FOLDER}"
"${STRIPPED_SYMBOL_FILE_PATH}" "${GENERATED_CODE_BASENAME}" "${GENERATED_CODE_FOLDER}"
"${CMAKE_CURRENT_SOURCE_DIR}/TranslateToDbc.py" "${DBC_OUTPUT_PATH}"
)

# Tell CMake that it needs to reconfigure if the symbol file changes
Expand All @@ -45,7 +54,7 @@ set_property(DIRECTORY APPEND PROPERTY
)

install(
FILES "${RESOLVED_SYMBOL_FILE}"
FILES "${RESOLVED_SYMBOL_FILE}" "${STRIPPED_SYMBOL_FILE_PATH}" "${DBC_OUTPUT_PATH}"
DESTINATION share/${PROJECT_NAME}/
)

Expand Down Expand Up @@ -105,7 +114,7 @@ install(FILES
)

install(
TARGETS ${lib_target} ${arduino_communication_test_target} ${mks_test_target} # These targets will be packaged
TARGETS ${lib_target} # These targets will be packaged
EXPORT ${PROJECT_NAME}Targets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
)
Expand Down
24 changes: 24 additions & 0 deletions src/umrt-can-definitions/TranslateToDbc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import cantools.database
import sys
import os

def translate(source_path: str, dbc_export_path: str):
db = cantools.database.load_file(source_path)
cantools.database.dump_file(db, dbc_export_path)


if __name__ == "__main__":
if len(sys.argv) != 3:
raise RuntimeError(f"Script must be called with a path to a cantools-supported file, and a path to export the "
f"DBC file to. Received: {sys.argv}")
source_path = sys.argv[1]
dbc_export_path = sys.argv[2]

if not dbc_export_path.endswith('.dbc'):
raise RuntimeError(f"DBC file to export to must end in \".dbc\". Received: {dbc_export_path}")

print("Ensuring output folder exists")
os.makedirs(os.path.dirname(dbc_export_path), exist_ok=True)

translate(source_path, dbc_export_path)

13 changes: 9 additions & 4 deletions src/umrt-can-definitions/generate_definitions_from_sym.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/bash

# Generates C code from a sym file as well as a translation of it to DBC

SYMBOL_FILE="$1"
OUTPUT_FILE_BASENAME="$2"
OUTPUT_FOLDER="$3"
TRANSLATION_SCRIPT_PATH="$4"
DBC_OUTPUT_PATH="$5"

echo "Generating source from sym file"
echo "Reading from '${SYMBOL_FILE}'"

# Strip "/slot:" tags, cantools doesn't like it
sed -E "s|/slot:[0-9]+||g" < "$SYMBOL_FILE" | \
sed -E "s|IDMask=[0-9A-F]+h||g" > "$OUTPUT_FOLDER/.tmp.sym"
python3 -m cantools generate_c_source --database-name "${OUTPUT_FILE_BASENAME}" -o "${OUTPUT_FOLDER}" "${SYMBOL_FILE}"

python3 -m cantools generate_c_source --database-name "$OUTPUT_FILE_BASENAME" -o "${OUTPUT_FOLDER}" "${OUTPUT_FOLDER}/.tmp.sym"
python3 "${TRANSLATION_SCRIPT_PATH}" "${SYMBOL_FILE}" "${DBC_OUTPUT_PATH}"
13 changes: 13 additions & 0 deletions src/umrt-can-definitions/strip_sym_file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/bash

# Removes the tags from a sym file that Python cantools doesn't like

SYMBOL_FILE="$1"
OUTPUT_FILE="$2"

echo "Stripping problematic sym file tags"
echo "Reading from '${SYMBOL_FILE}'"

# Strip "/slot:" tags, cantools doesn't like it
sed -E "s|/slot:[0-9]+||g" < "${SYMBOL_FILE}" | \
sed -E "s|IDMask=[0-9A-F]+h||g" > "${OUTPUT_FILE}"
3 changes: 1 addition & 2 deletions version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
0.0.40

0.0.46
Loading