Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into buggy-vision
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuroboclub committed Feb 11, 2025
2 parents 87201ad + 049ede2 commit 770ecf3
Show file tree
Hide file tree
Showing 46 changed files with 3,009 additions and 285 deletions.
3 changes: 3 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# NOTE: this file is not being used in docker compose correctly
# SET ALL ENVIRONMENT VARIABLES IN THE YAML
GPS_PORT=/dev/null
WEBCAM_PORT=/dev/null
RLSENSE_PORT=/dev/null
TEENSY_PORT=/dev/null
FEATHER_PORT=/dev/null

18 changes: 12 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
.DS_Store
rb_ws/bags
.docker-compose.yml.un~
.python-requirements.txt.un~
docker-compose.yml~
*TEMP_DO_NOT_EDIT.txt
rb_ws/src/buggy/bags/*

# BAGS
rb_ws/bags
rb_ws/src/buggy/bags/
*.bag
vision/data/*
.vision/*
runs/*
.sc/
rb_ws/rosbag2*/

# VISION
.vision/
vision/data/

#VENV
.sc/
24 changes: 10 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@ RUN apt-get install -y -qq \
COPY python-requirements.txt python-requirements.txt
RUN pip3 install -r python-requirements.txt


RUN echo 'source "/opt/ros/humble/setup.bash" --' >> ~/.bashrc && \
echo 'cd rb_ws' >> ~/.bashrc && \
echo 'colcon build --symlink-install' >> ~/.bashrc && \
echo 'source install/local_setup.bash' >> ~/.bashrc
# RUN echo 'source "/opt/ros/humble/setup.bash" --' >> ~/.bashrc && \
# echo 'cd rb_ws' >> ~/.bashrc && \
# echo 'catkin_make >/dev/null' >> ~/.bashrc && \
# echo 'source devel/setup.bash' >> ~/.bashrc



# RUN echo "exec firefox" > ~/.xinitrc && chmod +x ~/.xinitrc
# CMD ["x11vnc", "-create", "-forever"]
# ABSOLUTELY DO NOT use single quotes inside this block
# end any new lines with "\n\" (no quotes)
RUN printf '\n# automatically generated by Dockerfile \n\
source "/opt/ros/humble/setup.bash" -- \n\
cd rb_ws \n\
colcon build --symlink-install \n\
source install/local_setup.bash \n\
chmod -R +x src/buggy/scripts/ \n\
source environments/docker_env.bash \n\
\n' >> ~/.bashrc

# add mouse to tmux
RUN echo 'set -g mouse on' >> ~/.tmux.conf
1 change: 1 addition & 0 deletions docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- "${FEATHER_PORT:-/dev/null}:/dev/ttyACM1"
stdin_open: true # docker run -i
tty: true # docker run -t
env_file: .env.dev
environment:
- DISPLAY=host.docker.internal:0
hostname: main
Expand Down
4 changes: 3 additions & 1 deletion python-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
matplotlib
NavPy
numba
numpy
numpy<2
osqp
pandas
pymap3d
pyproj
pyserial
scipy
setuptools==58.2.0
trimesh
Expand Down
4 changes: 4 additions & 0 deletions rb_ws/environments/docker_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
export RBROOT=/rb_ws
export PYTHONPATH=$PYTHONPATH:$RBROOT/src/buggy/scripts
export TRAJPATH=$RBROOT/src/buggy/paths/
4 changes: 4 additions & 0 deletions rb_ws/environments/sc_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
export RBROOT=/home/nuc/robobuggy-software/rb_ws
export PYTHONPATH=$PYTHONPATH:$RBROOT/src/buggy/scripts
export TRAJPATH=$RBROOT/src/buggy/paths/
54 changes: 54 additions & 0 deletions rb_ws/src/buggy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cmake_minimum_required(VERSION 3.8)
project(buggy)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclpy REQUIRED)

# Install Launch Files
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}
)

# Install Python modules
# ament_python_install_package(${PROJECT_NAME})

# Install Python executables
install(PROGRAMS
scripts/hello_world.py
scripts/controller/controller_node.py
scripts/path_planner/path_planner.py
scripts/simulator/engine.py
scripts/watchdog/watchdog_node.py
scripts/buggy_state_converter.py
scripts/serial/ros_to_bnyahaj.py
scripts/telemetry/telematics.py
scripts/debug/debug_steer.py
DESTINATION lib/${PROJECT_NAME}
)


find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/TrajectoryMsg.msg"
"msg/SCDebugInfoMsg.msg"
"msg/SCSensorMsg.msg"
"msg/NANDRawGPSMsg.msg"
"msg/NANDDebugInfoMsg.msg"
)
ament_export_dependencies(rosidl_default_runtime)

ament_package()
Loading

0 comments on commit 770ecf3

Please sign in to comment.