Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
sleep 5

# Check if ROS2 nodes are running
if ! docker exec $CONTAINER_NAME bash -c "source /ws/install/setup.bash && ros2 node list" | grep -E "time_publisher|time_subscriber"; then
if ! docker exec $CONTAINER_NAME bash -c "source /ws/install/setup.bash && ros2 node list" | grep -E "torque_vectoring_node"; then
echo "Health check failed!"
echo "Expected nodes not found. Current nodes:"
docker exec $CONTAINER_NAME bash -c "source /ws/install/setup.bash && ros2 node list"
Expand Down
39 changes: 15 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ cmake_minimum_required(VERSION 3.8)

project(torque_vectoring_pkg)

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
# C++20 — required for the concepts in interfaces.hpp
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

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

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand All @@ -19,30 +17,33 @@ find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OsqpEigen REQUIRED)
find_package(vehicle_params_cpp REQUIRED)
find_package(ros2can_msgs REQUIRED)
find_package(fs_msgs REQUIRED)

# Include directories
include_directories(include)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)

# C++ executable
add_executable(torque_vectoring_node src/main.cpp)

target_include_directories(torque_vectoring_node PRIVATE include)

ament_target_dependencies(torque_vectoring_node
rclcpp
std_msgs
sensor_msgs
nav_msgs
fs_msgs
ros2can_msgs
tf2
tf2_ros
)

target_link_libraries(torque_vectoring_node
Eigen3::Eigen
OsqpEigen::OsqpEigen
vehicle_params_cpp::vehicle_params_cpp
target_link_libraries(torque_vectoring_node
Eigen3::Eigen
vehicle_params_cpp::vehicle_params_cpp
)

# Install C++ executables
Expand All @@ -51,22 +52,12 @@ install(TARGETS
DESTINATION lib/${PROJECT_NAME}
)

# Install Python modules (for importable Python code)

# Install Python executables

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

# Install config files
install(DIRECTORY
config
DESTINATION share/${PROJECT_NAME}
)

# Install include directory
install(DIRECTORY
include/
Expand Down
32 changes: 3 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,18 @@
# This is a template for a Dockerfile to build a docker image for your ROS2 package.
# The main purpose of this file is to install dependencies for your package.

FROM ros:jazzy-ros-base-noble

ENV ROS_DISTRO=jazzy

ENV ROS_ROOT=/opt/ros/${ROS_DISTRO}
ENV DEBIAN_FRONTEND=noninteractive

# Set up workspace
RUN mkdir -p /ws/src

# Set noninteractive installation
ENV DEBIAN_FRONTEND=noninteractive

# Package apt dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y \
python3-colcon-common-extensions \
ros-jazzy-rmw-cyclonedds-cpp \
python3-rosdep \
# EXAMPLE: \
# libssl-dev \
# libffi-dev \
libeigen3-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /ws


# Installing of pip dependencies
#RUN pip3 install \
# # EXAMPLE: \
# # torch \
# # torchvision \
# # tensorboardX \
# # opencv-python \
# # scikit-image \
# # scikit-learn \


# Build dependencies from source
#RUN git clone https://github.com/your-github-username/your-repo.git
#WORKDIR your-repo
#RUN make
Loading
Loading