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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ git clone https://github.com/intrinsic-ai/sdk-ros.git
Source ROS and build the SDK.

```bash
sudo apt update && sudo apt install clang-19
source /opt/ros/jazzy.setup.bash
cd ~/intrinsic_ws/
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/bin/clang-19 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19 \
colcon build \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--event-handlers=console_direct
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ RUN set -x \
RUN . /opt/ros/jazzy/setup.sh \
&& set -x \
&& apt-get update \
&& apt install clang-19 -y \
&& rosdep update --rosdistro jazzy \
&& cd /opt/intrinsic/intrinsic_sdk_cmake \
&& touch src/intrinsic_sdk_ros/intrinsic_sdk/COLCON_IGNORE \
Expand All @@ -105,8 +104,7 @@ RUN . /opt/ros/jazzy/setup.sh \
&& touch src/intrinsic_sdk_ros/intrinsic_sdk/COLCON_IGNORE \
&& touch src/intrinsic_sdk_ros/intrinsic_sdk_ros/COLCON_IGNORE \
&& colcon build \
--cmake-args -DBUILD_TESTING=ON \
-DCMAKE_C_COMPILER=/usr/bin/clang-19 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19 \
--cmake-args -DBUILD_TESTING=OFF \
--event-handlers console_direct+ console_stderr- \
--merge-install \
--executor=sequential
Expand Down
7 changes: 0 additions & 7 deletions ortools_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
cmake_minimum_required(VERSION 3.10)
project(ortools_vendor CXX)

if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR
"Clang is required. Detected: ${CMAKE_CXX_COMPILER_ID}. "
"'sudo apt install clang-19' and invoke colcon with --cmake-args as shown in "
"https://github.com/intrinsic-ai/sdk-ros?tab=readme-ov-file#getting-started")
endif()

# Default to C++20
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
Expand Down
13 changes: 13 additions & 0 deletions ortools_vendor/patches/fix_clang_issue.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/ortools/constraint_solver/routing_filter_committables.h b/ortools/constraint_solver/routing_filter_committables.h
index 5249064..1d38f41 100644
--- a/ortools/constraint_solver/routing_filter_committables.h
+++ b/ortools/constraint_solver/routing_filter_committables.h
@@ -58,7 +58,7 @@ template <typename T>
class CommittableArray {
public:
// Makes a vector with initial elements all committed to value.
- CommittableArray<T>(size_t num_elements, const T& value)
+ CommittableArray(size_t num_elements, const T& value)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codebot this is the required change, AFAIK this is just not valid c++ code, but clang seems to allow it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I just tested this in a "normal" colcon build, and it works great!

: elements_(num_elements, {value, value}), changed_(num_elements) {}

// Return the size of the vector.
8 changes: 4 additions & 4 deletions ortools_vendor/patches/fix_ip_parser_cc.diff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/ortools/lp_data/lp_parser.cc b/ortools/lp_data/lp_parser.cc
index b0447ad..a8513ce 100644
index e872c4f..37a7fe7 100644
--- a/ortools/lp_data/lp_parser.cc
+++ b/ortools/lp_data/lp_parser.cc
@@ -347,16 +347,14 @@ TokenType LPParser::ConsumeToken(StringPiece* sp) {
@@ -362,16 +362,14 @@ TokenType LPParser::ConsumeToken(StringPiece* sp) {

} // namespace

Expand All @@ -21,7 +21,7 @@ index b0447ad..a8513ce 100644
}

Fractional left_bound;
@@ -417,8 +415,9 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
@@ -432,8 +430,9 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
right_bound = consumed_coeff;
if (ConsumeToken(&constraint, &consumed_name, &consumed_coeff) !=
TokenType::END) {
Expand All @@ -32,7 +32,7 @@ index b0447ad..a8513ce 100644
}
}

@@ -447,6 +446,13 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
@@ -462,6 +461,13 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
return parsed_constraint;
}

Expand Down