Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
0b76024
Added autobrake.
sidharthmrao Apr 30, 2024
4c04d6c
Fix package
sidharthmrao Apr 30, 2024
4b0e82e
Made a teleop package, made a make_package script, fixed dockerfile r…
sidharthmrao Oct 1, 2024
8c023c5
Update README
sidharthmrao Oct 2, 2024
1d8fcbc
Finished porting teleop.
sidharthmrao Oct 2, 2024
aab5cc2
Updated many build steps
utkudotdev Oct 2, 2024
53e12de
Created autonomy launch file, moved joy and rplidar outside of teleop…
sidharthmrao Oct 2, 2024
6bfe082
Merge main.
sidharthmrao Oct 4, 2024
f9ea554
Merge pull request #2 from cornellev/feature/docker-deploy
sidharthmrao Oct 5, 2024
478dd15
Added clang formatting using Ethan's file
utkudotdev Oct 5, 2024
684945c
Merge pull request #3 from cornellev/feature/better-dev
sidharthmrao Oct 6, 2024
ef7cd03
Fully fixed autobrake.
sidharthmrao Oct 19, 2024
1f1200f
Merge pull request #6 from cornellev/feature/autobrake
sidharthmrao Oct 19, 2024
c220de3
Encoder odometry.
sidharthmrao Oct 19, 2024
776efef
Temporarily remove rigth encoder to fix odom.
sidharthmrao Oct 19, 2024
24894dd
Initial commit
sidharthmrao Oct 25, 2024
7c34df3
Update README.md
sidharthmrao Oct 25, 2024
2939a36
Setup ROS 2 development environment.
sidharthmrao Oct 25, 2024
3c9812c
Basic bicycle kinematics filter, need to debug sensor sim.
sidharthmrao Oct 26, 2024
8bdf82a
Fixed covariance invertability issues.
sidharthmrao Oct 28, 2024
6eda260
Fixed kalman gain update.
sidharthmrao Oct 28, 2024
a366868
Update dir structure.
sidharthmrao Oct 29, 2024
fe6f10e
Create base for cpp package.
sidharthmrao Nov 9, 2024
e07a75b
Begin basic header for model class.
sidharthmrao Nov 9, 2024
cba2227
Fixed CMakeLists include
sidharthmrao Nov 9, 2024
6b7c4c5
Setup headers and base implementation for
sidharthmrao Nov 9, 2024
3983a17
Template UpdateModel on state size, create AckermannModel
sidharthmrao Nov 11, 2024
79d18b6
Derive from state class.
sidharthmrao Nov 12, 2024
b01f0c0
Finish basic ackermann model, added launch file.
sidharthmrao Nov 12, 2024
5a7f021
Clean.
sidharthmrao Nov 12, 2024
e93323d
Make HasState hold protected values so that it can create getState fu…
sidharthmrao Nov 12, 2024
0197fc7
Make basic sensor models
sidharthmrao Nov 12, 2024
1175c18
Finish creating updater-updateable model.
sidharthmrao Nov 13, 2024
91fb4a6
SensorCollect
sidharthmrao Nov 13, 2024
5891213
README
sidharthmrao Nov 13, 2024
2a02eca
Comment sensor collect
sidharthmrao Nov 13, 2024
8e3291f
Make sensor collect time based
sidharthmrao Nov 13, 2024
249a7f2
Added cev_msgs submodule.
sidharthmrao Nov 13, 2024
34d10a5
temp.
sidharthmrao Nov 13, 2024
d606fa0
Integrate cev_msgs, make ros node to output and handle sensor data.
sidharthmrao Nov 13, 2024
1cf769d
Start point cloud collapsing
utkudotdev Nov 23, 2024
5587343
Updating works, but does not update internal state.
sidharthmrao Nov 24, 2024
1919b76
Successfully update for one sensor.
sidharthmrao Nov 24, 2024
d8e365d
Fixed non-sensor update
sidharthmrao Nov 24, 2024
9bedfb7
Theoretically wrote occupancy grid collapser
utkudotdev Nov 24, 2024
227347a
Use sim time
sidharthmrao Nov 24, 2024
e262308
Use sim time
sidharthmrao Nov 24, 2024
3efaee5
Moved to ROS 2 Python package structure
utkudotdev Nov 24, 2024
33c0dc5
v3 rosbag
sidharthmrao Nov 24, 2024
da291d0
v3 rosbag
sidharthmrao Nov 24, 2024
f9cc03e
Update timestamp to float64
sidharthmrao Nov 24, 2024
94e258d
WORKSgit add .
sidharthmrao Nov 24, 2024
24d7282
Merge pull request #1 from cornellev/fixed_state_altered_indiv
sidharthmrao Nov 24, 2024
3e1a088
Make some updates to deploy script
utkudotdev Nov 24, 2024
c06b9b4
Fix misc bugs.
sidharthmrao Nov 25, 2024
10c4f5b
Fixed stupid problems
utkudotdev Nov 26, 2024
d32f33d
Semi-working, some jumps?
sidharthmrao Nov 26, 2024
318a3ae
Merge pull request #2 from cornellev/cleanup
sidharthmrao Nov 26, 2024
8502ee7
Fixed yaw wrap issue
sidharthmrao Nov 27, 2024
383ca9e
Fix wheelbase size
sidharthmrao Nov 27, 2024
95b995e
Close to working
utkudotdev Nov 27, 2024
da00a5a
Final polish on occupancy_transformer
utkudotdev Nov 27, 2024
0e0cac9
numpy indexing
utkudotdev Nov 27, 2024
96ed727
Rviz2 launch file for debugging.
sidharthmrao Nov 28, 2024
5475d94
Merge pull request #3 from cornellev/IRL_Fixes
sidharthmrao Nov 28, 2024
19189e1
Update wheelbase dimensions.
sidharthmrao Nov 30, 2024
8fe88c2
ITS CRACKED HOLY
sidharthmrao Dec 3, 2024
69844b6
Fixed encoder odom by removing average
sidharthmrao Dec 3, 2024
24ee161
Merge pull request #4 from cornellev/IRL_Fixes
sidharthmrao Dec 3, 2024
fe54407
Add back continuous updating
sidharthmrao Dec 3, 2024
92b7173
Merge branch 'IRL_Fixes'
sidharthmrao Dec 3, 2024
48df084
Rename to cev_localization
sidharthmrao Dec 4, 2024
b1040c5
Change to base_link.
sidharthmrao Dec 4, 2024
1c56905
Regular time updates.
sidharthmrao Dec 4, 2024
08a65f3
Add covariances
sidharthmrao Dec 4, 2024
de18f77
HELP
sidharthmrao Dec 6, 2024
6be75ff
Created config parser.
sidharthmrao Dec 6, 2024
672920b
Custom config
sidharthmrao Dec 7, 2024
70666e6
Submodule cev_kalman_filter
sidharthmrao Dec 9, 2024
62a609a
Fixed CMAKE YAYYYYY
sidharthmrao Dec 9, 2024
6c74c45
Builds :cry:
sidharthmrao Dec 9, 2024
7f3f248
Configuration works!
sidharthmrao Dec 9, 2024
2414db4
Add better error logs.
sidharthmrao Dec 10, 2024
a3ee2e3
Config file appears to work.
sidharthmrao Dec 10, 2024
6aab11e
Changed configuration state to an array of strings representing activ…
sidharthmrao Dec 10, 2024
f34aff5
Add cartesian filter
sidharthmrao Dec 11, 2024
e593e10
Add configuration option for cartesian.
sidharthmrao Dec 11, 2024
ca990fe
Merge pull request #5 from cornellev/config_parser
sidharthmrao Dec 11, 2024
abc3064
Add TODO
sidharthmrao Jan 17, 2025
e35b4d7
Added trajectory and waypoint messages.
sidharthmrao Jan 24, 2025
48264a6
Message-based covariance.
sidharthmrao Jan 25, 2025
e4d4d83
Initial commit.
sidharthmrao Jan 25, 2025
126edbf
Made base ros node for planning.
sidharthmrao Jan 26, 2025
52ee559
Make a full global planning pipeline.
sidharthmrao Jan 26, 2025
d36ad58
Switch to eigen.
sidharthmrao Feb 1, 2025
78b0475
Added NLopt
sidharthmrao Feb 1, 2025
8b0c1fd
Update submodule.
sidharthmrao Feb 1, 2025
8c447d5
Optimization success to some extent.
sidharthmrao Feb 4, 2025
cd6056f
Slows at inflections of steering rate?
sidharthmrao Feb 4, 2025
85b300b
Constraint free optimization leads to faster convergence.
sidharthmrao Feb 4, 2025
9174af9
Nelder-Mead is unbelievably cracked. .003 s on avg iter.
sidharthmrao Feb 4, 2025
3c43a47
Added kernel image output.
sidharthmrao Feb 5, 2025
3745dc4
Falloff experimentation.
sidharthmrao Feb 5, 2025
9af4bb6
Random seeding.
sidharthmrao Feb 5, 2025
8408812
Get position in map frame.
sidharthmrao Feb 5, 2025
c814e35
Expand planner node to test kernel integration.
sidharthmrao Feb 6, 2025
4547509
Works!
sidharthmrao Feb 6, 2025
784e59a
OMG
sidharthmrao Feb 7, 2025
edea615
Rviz debugging util.
sidharthmrao Feb 8, 2025
1576e8a
Oh. My. God!
sidharthmrao Feb 8, 2025
ac587c0
Update README.md
sidharthmrao Feb 8, 2025
e844126
Forgot cev_msgs
sidharthmrao Feb 8, 2025
2b80392
Update Waypoint.msg to include inputs.
sidharthmrao Feb 9, 2025
2e36d1b
Sending to car
sidharthmrao Feb 9, 2025
67980d0
Fix transform.
sidharthmrao Feb 11, 2025
967d698
Reduce planning gap.
sidharthmrao Feb 11, 2025
ec79f29
pid tuning part 1
sidharthmrao Feb 12, 2025
1dbefc2
Merge pull request #20 from cornellev/feature/pid-tuning
sidharthmrao Feb 12, 2025
c6e9be2
Publish tf
sidharthmrao Feb 12, 2025
0f224b9
Merge pull request #5 from cornellev/feature/cost-map/sdf
sidharthmrao Feb 12, 2025
8ed79c6
Fixed configuration struct.
sidharthmrao Feb 12, 2025
0e4e2e5
Plan extension
sidharthmrao Feb 14, 2025
3324379
Merge pull request #22 from cornellev/feature/planning_algorithms
sidharthmrao Feb 15, 2025
ce7f950
Update internal lib
sidharthmrao Feb 16, 2025
445b476
Weird memory tf
sidharthmrao Feb 16, 2025
cf94003
Make publish topics configurable at an Estimator level.
sidharthmrao Feb 16, 2025
e76f13b
Merge pull request #8 from cornellev/config_parser
sidharthmrao Feb 16, 2025
8da8731
Better obs avoidance
sidharthmrao Feb 17, 2025
2d93b79
Integrating rrt in planner node for testing
Ibrahim-Ahmed123 Feb 17, 2025
aae3ccd
Time-variant mpc
sidharthmrao Feb 17, 2025
1a7fae0
Update internal
sidharthmrao Feb 17, 2025
73b3772
Merge pull request #6 from cornellev/feature/local-planner/mpc
sidharthmrao Feb 17, 2025
fae5a28
update internals
Ibrahim-Ahmed123 Feb 17, 2025
124ccfa
Merge branch 'main' into feature/global-planner/RRT
Ibrahim-Ahmed123 Feb 17, 2025
f7a9741
0.3
Ibrahim-Ahmed123 Feb 17, 2025
29084c7
RRT MPC integration
sidharthmrao Feb 17, 2025
2e00091
wat
sidharthmrao Feb 18, 2025
0710200
Add timestep to Trajectory
sidharthmrao Feb 18, 2025
4ec3201
Fix msg
sidharthmrao Feb 18, 2025
59a8586
Report timestep
sidharthmrao Feb 18, 2025
d12e6dd
Bruh
sidharthmrao Feb 18, 2025
8efdf88
mew
sidharthmrao Feb 18, 2025
20240c7
m
sidharthmrao Feb 18, 2025
08f2d6d
Im crashing out
sidharthmrao Feb 18, 2025
30b7df0
Sorta
sidharthmrao Feb 18, 2025
cf1a853
KMS :skull:
sidharthmrao Feb 20, 2025
f2a7465
Maybe better?
sidharthmrao Feb 20, 2025
73e5652
Maybeeeee?
sidharthmrao Feb 21, 2025
061277a
Separate traj follower and autobrake into diff packages
sidharthmrao Feb 22, 2025
bef4029
Separate traj follower and autobrake into diff packages
sidharthmrao Feb 22, 2025
b49dbf0
Fix package name.
sidharthmrao Feb 22, 2025
cc63bb4
Rename
sidharthmrao Feb 22, 2025
a2a1052
Add joy to launch file
sidharthmrao Feb 22, 2025
0d993a8
Goes outside
sidharthmrao Feb 22, 2025
e4716d5
Nearest expansion
sidharthmrao Feb 22, 2025
4de54a0
Omg
sidharthmrao Feb 22, 2025
ac61885
Cooking?
sidharthmrao Feb 22, 2025
e88dde9
Merge pull request #7 from cornellev/feature/global-planner/RRT
sidharthmrao Feb 22, 2025
c99e006
brooo
Ibrahim-Ahmed123 Feb 22, 2025
517b9b9
Return only score
sidharthmrao Feb 22, 2025
6053b65
Merge remote-tracking branch 'origin/feature/global-planner/RRT' into…
sidharthmrao Feb 22, 2025
9b73699
Merge branch 'feature/global-planner/RRT' into feature/heading-based-…
sidharthmrao Feb 22, 2025
af0fbed
ug?
sidharthmrao Feb 22, 2025
faa6493
omgomgomg
sidharthmrao Feb 23, 2025
094d684
Super fast somehow
sidharthmrao Feb 25, 2025
7b2186a
SAVE SAVE SAVE
sidharthmrao Feb 25, 2025
5d07b17
Stop at half the time
sidharthmrao Feb 25, 2025
ce50625
Merge pull request #8 from cornellev/omgomg
sidharthmrao Mar 1, 2025
7a10b7f
type shi
Ibrahim-Ahmed123 Mar 1, 2025
519fb1e
curvy corners
Ibrahim-Ahmed123 Mar 3, 2025
4ea36e4
:(
Ibrahim-Ahmed123 Mar 4, 2025
9c12f42
p
Ibrahim-Ahmed123 Mar 4, 2025
a5206c7
a
Ibrahim-Ahmed123 Mar 4, 2025
38998cd
reverse interpolate
Ibrahim-Ahmed123 Mar 5, 2025
efb287e
my laptop better
Ibrahim-Ahmed123 Mar 5, 2025
39c72bb
bingchilling
Ibrahim-Ahmed123 Mar 5, 2025
77b6b32
gpt king
Ibrahim-Ahmed123 Mar 5, 2025
03e4db7
uh
Ibrahim-Ahmed123 Mar 5, 2025
8e517b1
better
Ibrahim-Ahmed123 Mar 5, 2025
56af7ae
Backwards constraints adjustments.
sidharthmrao Mar 8, 2025
56e96df
Update .gitmodules
sidharthmrao Mar 9, 2025
e2e2e9a
Remove y button vel
sidharthmrao Mar 9, 2025
dd56051
Merge pull request #11 from cornellev/feature/global-planner/RRT
sidharthmrao Mar 10, 2025
4169d83
Created Obstacle.msg for single cluster / obstacle inputs and Obstacl…
sophtsang Sep 18, 2025
c8b790b
Updated README to include Obstacle and Obstacles.msg documentation
sophtsang Sep 18, 2025
534685d
editted Obstacles.msg to be PointCloud2 array and added sensor_msgs d…
sophtsang Sep 27, 2025
090d71d
config file for constraints
Ibrahim-Ahmed123 Oct 30, 2025
bf8129d
Fix dev container build
utkudotdev Jan 24, 2026
4d7a818
Fix containers fr
utkudotdev Jan 24, 2026
a635d6c
Fix CI
utkudotdev Jan 24, 2026
1be96ca
Fix CI
utkudotdev Jan 24, 2026
dc46a9f
Fix CI
utkudotdev Jan 24, 2026
ba344f0
Fix comment
utkudotdev Jan 25, 2026
bb62937
Fix comment
utkudotdev Jan 25, 2026
7a1352d
Update cev_planner submodule
utkudotdev Jan 25, 2026
7e755fd
Fix chown
utkudotdev Jan 25, 2026
884da0f
Move all files to cev/cev_autobrake_ros2
utkudotdev Jan 25, 2026
7a5db95
Remove cev_autobrake_ros2
utkudotdev Jan 25, 2026
d4ca875
Merge remote-tracking branch 'cev_autobrake_ros2/monorepo-migrate' in…
utkudotdev Jan 25, 2026
a406582
Move all files to cev/cev_encoder_odometry_ros2
utkudotdev Jan 25, 2026
19148f9
Remove cev_encoder_odometry_ros2
utkudotdev Jan 25, 2026
2fe3e6e
Merge remote-tracking branch 'cev_encoder_odometry_ros2/monorepo-migr…
utkudotdev Jan 25, 2026
2b6c612
Move all files to cev/cev_localization_ros2
utkudotdev Jan 25, 2026
33189cd
Remove cev_localization_ros2
utkudotdev Jan 25, 2026
71f9d28
Merge remote-tracking branch 'cev_localization_ros2/monorepo-migrate'…
utkudotdev Jan 25, 2026
20e0edc
Move all files to cev/cev_planner_ros2
utkudotdev Jan 25, 2026
3d238cc
Remove cev_planner_ros2
utkudotdev Jan 25, 2026
0b31f11
Merge remote-tracking branch 'cev_planner_ros2/monorepo-migrate' into…
utkudotdev Jan 25, 2026
55512c3
Move all files to cev/cev_teleop_ros2
utkudotdev Jan 25, 2026
9a6743e
Remove cev_teleop_ros2
utkudotdev Jan 25, 2026
1603cc7
Merge remote-tracking branch 'cev_teleop_ros2/monorepo-migrate' into …
utkudotdev Jan 25, 2026
97bc782
Move all files to cev/cev_trajectory_follower_ros2
utkudotdev Jan 25, 2026
613f32e
Remove cev_trajectory_follower_ros2
utkudotdev Jan 25, 2026
92bddd1
Merge remote-tracking branch 'cev_trajectory_follower_ros2/monorepo-m…
utkudotdev Jan 25, 2026
15cc0f4
Move all files to cev/cev_vision_ros2
utkudotdev Jan 25, 2026
c53e80d
Remove cev_vision_ros2
utkudotdev Jan 25, 2026
df88740
Merge remote-tracking branch 'cev_vision_ros2/monorepo-migrate' into …
utkudotdev Jan 25, 2026
72be885
Move all files to cev/cev_msgs
utkudotdev Jan 25, 2026
a44e7b5
Remove cev_msgs
utkudotdev Jan 25, 2026
abff5c6
Merge remote-tracking branch 'cev_msgs/monorepo-migrate' into tooling…
utkudotdev Jan 25, 2026
f5b174b
Fix gitmodules
utkudotdev Jan 25, 2026
41013b8
Move hardware files
utkudotdev Jan 25, 2026
af05ae5
Move general packages to all directory
utkudotdev Jan 25, 2026
4d8a8c4
Move mux and serial_com
utkudotdev Jan 25, 2026
53df0a3
Fix launch files
utkudotdev Jan 25, 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
7 changes: 3 additions & 4 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"--ipc=host",
"--privileged"
],
"containerUser": "cev",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
Expand All @@ -20,10 +21,8 @@
"customizations": {
"vscode": {
"extensions": [
"ms-iot.vscode-ros",
"ms-vscode.cpptools-extension-pack",
"ms-python.black-formatter",
"xaver.clang-format"
"llvm-vs-code-extensions.vscode-clangd"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
Expand All @@ -33,7 +32,7 @@
}
},
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"[python]": {
"diffEditor.ignoreTrimWhitespace": false,
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ on:
branches: [ "main" ]

jobs:

build:

build-deploy:
runs-on: ubuntu-22.04

steps:
- name: Fetch recursively
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
run: docker build . --file Dockerfile.deploy --tag rc-brain-deploy:$(date +%s)

build-dev:
runs-on: ubuntu-22.04
steps:
- name: Fetch recursively
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
run: docker build . --file Dockerfile.dev --tag rc-brain-dev:$(date +%s)
33 changes: 9 additions & 24 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "cev_msgs"]
path = cev_msgs
url = https://github.com/cornellev/cev_msgs.git
[submodule "external/serial-ros2"]
path = external/serial-ros2
url = https://github.com/RoverRobotics-forks/serial-ros2.git
Expand All @@ -13,24 +10,12 @@
[submodule "external/bond"]
path = external/bond
url = https://github.com/ros/bond_core.git
[submodule "cev/cev_localization_ros2"]
path = cev/cev_localization_ros2
url = https://github.com/cornellev/cev_localization_ros2.git
[submodule "cev/cev_planner_ros2"]
path = cev/cev_planner_ros2
url = https://github.com/cornellev/cev_planner_ros2.git
[submodule "cev/cev_autobrake_ros2"]
path = cev/cev_autobrake_ros2
url = https://github.com/cornellev/cev_autobrake_ros2.git
[submodule "cev/cev_teleop_ros2"]
path = cev/cev_teleop_ros2
url = https://github.com/cornellev/cev_teleop_ros2.git
[submodule "cev/cev_vision_ros2"]
path = cev/cev_vision_ros2
url = https://github.com/cornellev/cev_vision_ros2.git
[submodule "cev/cev_encoder_odometry_ros2"]
path = cev/cev_encoder_odometry_ros2
url = https://github.com/cornellev/cev_encoder_odometry_ros2.git
[submodule "cev/cev_trajectory_follower_ros2"]
path = cev/cev_trajectory_follower_ros2
url = https://github.com/cornellev/cev_trajectory_follower_ros2.git
[submodule "cev/all/cev_planner_ros2/cev_planner"]
path = cev/all/cev_planner_ros2/cev_planner
url = https://github.com/cornellev/cev_planner.git
[submodule "cev/all/cev_planner_ros2/matplotlib-cpp"]
path = cev/all/cev_planner_ros2/tmp/matplotlib-cpp
url = https://github.com/lava/matplotlib-cpp.git
[submodule "cev/all/cev_localization_ros2/cev_kalman_filter"]
path = cev/all/cev_localization_ros2/cev_kalman_filter
url = https://github.com/cornellev/cev_kalman_filter
56 changes: 0 additions & 56 deletions Dockerfile

This file was deleted.

48 changes: 27 additions & 21 deletions Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ FROM ros:humble

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

# Set up CEV user
RUN useradd -m -s /bin/bash cev
RUN usermod -aG sudo cev
# Grant passwordless sudo access to the 'sudo' group
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER cev

# Docker doesn't do this by default
RUN sudo chown -R cev /home/cev


ARG FOLDER_NAME=rc-brain
ARG WORKSPACE_DIR=/home/cev
WORKDIR $WORKSPACE_DIR
Expand All @@ -12,36 +23,31 @@ RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
RUN echo "source $WORKSPACE_DIR/install/setup.bash" >> ~/.bashrc

# Init rosdep and update package index
# for some reason we need to do this
RUN rm /var/lib/dpkg/info/libc-bin.*
RUN apt-get clean
RUN apt-get update
RUN apt-get install libc-bin
RUN sudo apt-get update
RUN rosdep update --rosdistro $ROS_DISTRO

RUN mkdir -p src/$FOLDER_NAME

# Install and build build-from-source packages
# We do this as a separate step from the stuff for our code, since that changes more frequently
RUN cd src && \
git clone https://github.com/Slamtec/sllidar_ros2.git && \
cd sllidar_ros2 && \
git checkout 3430009
COPY --chown=cev --parents external/**/package.xml src/$FOLDER_NAME/
RUN source /opt/ros/$ROS_DISTRO/setup.bash && rosdep install --from-paths src -r -y
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build

# Install self dependencies with rosdep
COPY --parents ./*/package.xml src/$FOLDER_NAME
# Run install_extra.sh, which installs additional dependencies
COPY --chown=cev scripts/install_extra.sh src/$FOLDER_NAME/scripts/
RUN sudo src/$FOLDER_NAME/scripts/install_extra.sh

# Finally build external packages
COPY --chown=cev external src/$FOLDER_NAME/external/
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install

# Install all other dependencies
COPY --chown=cev --parents **/package.xml src/$FOLDER_NAME/
RUN source /opt/ros/$ROS_DISTRO/setup.bash && rosdep install --from-paths src -r -y

# Clean up apt cache to make container smaller
RUN apt-get clean
RUN sudo apt-get clean

# Build
COPY . src/$FOLDER_NAME
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build
COPY --chown=cev . src/$FOLDER_NAME
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install

# Copy entrypoint script
COPY entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/bin/bash", "/home/cev/entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "/home/cev/src/rc-brain/scripts/deployed_entrypoint.sh"]
52 changes: 26 additions & 26 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@ FROM ros:humble

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

# Set up CEV user
RUN useradd -m -s /bin/bash cev
RUN usermod -aG sudo cev
# Grant passwordless sudo access to the 'sudo' group
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER cev

ARG FOLDER_NAME=rc-brain
ARG WORKSPACE_DIR=/home/cev
WORKDIR $WORKSPACE_DIR

# Docker doesn't do this by default
RUN sudo chown -R cev /home/cev

# Source the ROS2 environment automatically when a new shell is created
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
RUN echo "source $WORKSPACE_DIR/install/setup.bash" >> ~/.bashrc

# Install dev tools
RUN apt-get update
RUN apt-get install -y curl
RUN curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN cat /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN echo $'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\n' \
$'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\n' \
$'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main\n' \
$'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main\n' \
$'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main\n' \
$'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main\n' \
| tee -a /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y clang-format clang-format-19
RUN sudo apt-get update
# Tools required to run clang install
RUN sudo apt-get install -y \
curl \
lsb-release \
software-properties-common \
gnupg
RUN curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- 19
RUN sudo apt-get install -y clangd-19
RUN sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-19 100

# Init rosdep and update package index
# for some reason we need to do this
RUN rm /var/lib/dpkg/info/libc-bin.*
RUN apt-get clean
RUN apt-get update
RUN apt-get install -y libc-bin
RUN rosdep update --rosdistro $ROS_DISTRO

RUN mkdir -p src/$FOLDER_NAME

# Copy install.sh
COPY --parents ./install.sh src/$FOLDER_NAME

# Run install.sh
RUN src/$FOLDER_NAME/install.sh
# Run install_extra.sh, which installs additional dependencies
COPY --chown=cev scripts/install_extra.sh src/$FOLDER_NAME/scripts/
RUN sudo src/$FOLDER_NAME/scripts/install_extra.sh

COPY --parents ./*/package.xml src/$FOLDER_NAME
# Install own dependencies
RUN mkdir -p src/$FOLDER_NAME
COPY --chown=cev --parents **/package.xml src/$FOLDER_NAME/
RUN source /opt/ros/$ROS_DISTRO/setup.bash && rosdep install --from-paths src -r -y
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# rc-brain
One repo to rule them all

## Installation
## Installation (local)
`git clone --recurse-submodules https://github.com/cornellev/rc-brain.git`
`cd rc-brain && sudo ./install.sh`

## Docker
`docker build -t cev-rc-autonomy .`
Then run either
`docker run --rm ros2-autonomy launch`
or
`docker run --rm ros2-autonomy teleop`
`cd rc-brain && sudo ./scripts/install_extra.sh`

## Development

Expand All @@ -21,12 +14,25 @@ Run `./scripts/deploy/arduino_deploy.sh` to compile and flash code to the arduin
#### Formatting
If you're not using the DevContainer, please make sure to install `clang-format`, ideally version 19! This will help keep the formatting of our C++ code formatted consistently. Python code is formatted by `black`. The DevContainer will install the `Black` extension for you, which ships with `black`, but otherwise you'll need to install it in VSCode or whatever other IDE you're using.

### Docker (DevContainer)
Everything should pretty much work out of the box, except...
> [!WARNING]
> You must have the Docker buildx plugin installed to build the image correctly. You may get very confusing failures!
> On Ubuntu, you can install the `docker-buildx-plugin` package.

### Deployment

#### Regular deployment
If you're just developing, building Docker images will probably take too long. You can deploy normally just by running `scripts/deploy.sh`. It will drop you into an interactive session at the end so you can launch whatever you want to.

#### Docker deployment
Use `docker build . --file Dockerfile.deploy -t rc-brain-deploy:latest` to build the deploy container.
Then run either `docker run --rm rc-brain-deploy launch` or `docker run --rm rc-brain-deploy teleop` to launch.

> [!WARNING]
> You must have the Docker buildx plugin installed to build the image correctly. You may get very confusing failures!
> On Ubuntu, you can install the `docker-buildx-plugin` package.

Our Docker deployment pipeline works by pushing Docker images to a local registry and pulling them down on the mini cars. This avoids both long build times on the mini cars and the long time it takes to transfer whole images (as we can take advantage of Docker's cache).

You'll have to do a bit of setup to get your computer to use the local registry. Note that you must be connected to `cev-router`.
Expand Down
Loading