Skip to content

Commit

Permalink
Merge branch 'master' into fullrebuild202310
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer committed Jan 26, 2024
2 parents fc20e35 + bc5373a commit 0d44fe3
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 0 deletions.
12 changes: 12 additions & 0 deletions conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ cython:
conda: [cython]
doxygen:
conda: [doxygen, graphviz]
draco:
conda: [draco]
eigen:
conda: [eigen]
emacs:
conda: [emacs]
festival:
conda: [festival, festvox-kallpc16k]
ffmpeg:
conda: [ffmpeg]
flac:
Expand Down Expand Up @@ -678,6 +682,8 @@ python3-future:
conda: [future]
python3-gi:
conda: [pygobject]
python3-git:
conda: [gitpython]
python3-github:
conda: [pygithub]
python3-github3:
Expand Down Expand Up @@ -758,6 +764,8 @@ python3-pymongo:
conda: [pymongo]
python3-pyproj:
conda: [pyproj]
python3-pysnmp:
conda: [pysnmp]
python3-pytest:
conda: [pytest]
python3-pytest-cov:
Expand Down Expand Up @@ -788,6 +796,8 @@ python3-rospkg-modules:
conda: [rospkg]
python3-ruamel.yaml:
conda: [ruamel.yaml]
python3-ruff:
conda: [ruff]
python3-scipy:
conda: [scipy]
python3-serial:
Expand Down Expand Up @@ -818,6 +828,8 @@ python3-twisted:
conda: [twisted]
python3-typeguard:
conda: [typeguard]
python3-unidiff:
conda: [unidiff]
python3-usb:
conda: [pyusb]
python3-venv:
Expand Down
51 changes: 51 additions & 0 deletions patch/ros-noetic-cras-cpp-common.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/cras_cpp_common/CMakeLists.txt b/cras_cpp_common/CMakeLists.txt
index b8e1640..876da61 100644
--- a/cras_cpp_common/CMakeLists.txt
+++ b/cras_cpp_common/CMakeLists.txt
@@ -225,12 +225,45 @@ add_library(cras_log_utils src/log_utils.cpp src/log_utils/memory.cpp src/log_ut
target_link_libraries(cras_log_utils
PUBLIC cras_string_utils ${catkin_LIBRARIES} PRIVATE cras_time_utils)

+# Detect compiler SIMD support. We'll need it for cras_tf2_sensor_msgs target.
+include(CheckCXXCompilerFlag)
+unset(COMPILER_SUPPORTS_MARCH_X86_V3 CACHE)
+unset(COMPILER_SUPPORTS_MARCH_X86_V2 CACHE)
+unset(COMPILER_SUPPORTS_MARCH_ARMV8 CACHE)
+unset(COMPILER_SUPPORTS_MARCH_ARMV7 CACHE)
+unset(COMPILER_SUPPORTS_MARCH_NATIVE CACHE)
+set(X86_V2_FLAGS -msse4 -msse3)
+set(X86_V3_FLAGS -mavx2 -mavx -mfma)
+list(APPEND X86_V3_FLAGS ${X86_V2_FLAGS})
+CHECK_CXX_COMPILER_FLAG("-march=x86-64 ${X86_V3_FLAGS}" COMPILER_SUPPORTS_MARCH_X86_V3)
+CHECK_CXX_COMPILER_FLAG("-march=x86-64 ${X86_V2_FLAGS}" COMPILER_SUPPORTS_MARCH_X86_V2)
+CHECK_CXX_COMPILER_FLAG("-march=armv8-a" COMPILER_SUPPORTS_MARCH_ARMV8)
+CHECK_CXX_COMPILER_FLAG("-march=armv7-a+neon" COMPILER_SUPPORTS_MARCH_ARMV7)
+CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
+
add_library(cras_tf2_sensor_msgs src/tf2_sensor_msgs.cpp)
add_dependencies(cras_tf2_sensor_msgs ${catkin_EXPORTED_TARGETS})
-target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=native)
target_link_libraries(cras_tf2_sensor_msgs
PUBLIC ${catkin_LIBRARIES}
PRIVATE cras_cloud cras_string_utils Eigen3::Eigen)
+# The pointcloud processing loop really needs SIMD. We enable it conservatively.
+# ROS buildfarm should pick up x86-64-v3 for x86 builds, armv7 for armhf builds and armv8 for arm64 builds.
+if (COMPILER_SUPPORTS_MARCH_X86_V3)
+ target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=x86-64 ${X86_V3_FLAGS})
+ message("cras_tf2_sensor_msgs uses x86-64-v3 SIMD")
+elseif (COMPILER_SUPPORTS_MARCH_X86_V2)
+ target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=x86-64 ${X86_V2_FLAGS})
+ message("cras_tf2_sensor_msgs uses x86-64-v2 SIMD")
+elseif (COMPILER_SUPPORTS_MARCH_ARMV7)
+ target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=armv7-a+neon)
+ message("cras_tf2_sensor_msgs uses armv7-a+simd SIMD")
+elseif (COMPILER_SUPPORTS_MARCH_ARMV8)
+ target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=armv8-a)
+ message("cras_tf2_sensor_msgs uses armv8-a SIMD")
+elseif (COMPILER_SUPPORTS_MARCH_NATIVE)
+ target_compile_options(cras_tf2_sensor_msgs PRIVATE -march=native)
+ message("cras_tf2_sensor_msgs uses native SIMD")
+endif()

add_library(cras_type_utils src/type_utils.cpp)
target_link_libraries(cras_type_utils
12 changes: 12 additions & 0 deletions robostack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ cython:
robostack: [cython]
doxygen:
robostack: [doxygen, graphviz]
draco:
robostack: [draco]
eigen:
robostack: [eigen]
emacs:
robostack: [emacs]
festival:
robostack: [festival, festvox-kallpc16k]
ffmpeg:
robostack: [ffmpeg]
flac:
Expand Down Expand Up @@ -691,6 +695,8 @@ python3-future:
robostack: [future]
python3-gi:
robostack: [pygobject]
python3-git:
robostack: [gitpython]
python3-github:
robostack: [pygithub]
python3-github3:
Expand Down Expand Up @@ -771,6 +777,8 @@ python3-pymongo:
robostack: [pymongo]
python3-pyproj:
robostack: [pyproj]
python3-pysnmp:
robostack: [pysnmp]
python3-pytest:
robostack: [pytest]
python3-pytest-cov:
Expand Down Expand Up @@ -803,6 +811,8 @@ python3-rospkg-modules:
robostack: [rospkg]
python3-ruamel.yaml:
robostack: [ruamel.yaml]
python3-ruff:
robostack: [ruff]
python3-scipy:
robostack: [scipy]
python3-serial:
Expand Down Expand Up @@ -833,6 +843,8 @@ python3-twisted:
robostack: [twisted]
python3-typeguard:
robostack: [typeguard]
python3-unidiff:
robostack: [unidiff]
python3-usb:
robostack: [pyusb]
python3-venv:
Expand Down
29 changes: 29 additions & 0 deletions vinca_linux_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,35 @@ skip_existing:
- https://conda.anaconda.org/robostack-staging/

packages_select_by_deps:
- cras_cpp_common # maintainer peci1
- cras_py_common # maintainer peci1
- cras_docs_common # maintainer peci1
- cras_topic_tools # maintainer peci1
- image_transport_codecs # maintainer peci1
- point_cloud_transport # maintainer peci1
- point_cloud_transport_plugins # maintainer peci1
- draco_point_cloud_transport # maintainer peci1
- sensor_filters # maintainer peci1
- cras_relative_positional_controller # maintainer peci1
- cras_msgs # maintainer peci1
- compass_msgs # maintainer peci1
- magnetometer_compass # maintainer peci1
- electronic_io_msgs # maintainer peci1
- electronic_io # maintainer peci1
- point_cloud_color # maintainer peci1
- rosmsg_cpp # maintainer peci1
- snmp_ros # maintainer peci1
- robot_body_filter # maintainer peci1
- static_transform_mux # maintainer peci1
- tf_remapper_cpp # maintainer peci1
- roslint # maintainer peci1
- tf2_server # maintainer peci1
- rosbash_params # maintainer peci1
- dynamic_robot_state_publisher # maintainer peci1
- tf2_client # maintainer peci1
- tf_static_publisher # maintainer peci1
- movie_publisher # maintainer peci1
- geometric_shapes
- teleop-twist-keyboard
- rosserial-client
- rosserial-arduino
Expand Down
29 changes: 29 additions & 0 deletions vinca_linux_aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ skip_existing:
- https://conda.anaconda.org/robostack-staging/

packages_select_by_deps:
- cras_cpp_common # maintainer peci1
- cras_py_common # maintainer peci1
- cras_docs_common # maintainer peci1
- cras_topic_tools # maintainer peci1
- image_transport_codecs # maintainer peci1
- point_cloud_transport # maintainer peci1
- point_cloud_transport_plugins # maintainer peci1
- draco_point_cloud_transport # maintainer peci1
- sensor_filters # maintainer peci1
- cras_relative_positional_controller # maintainer peci1
- cras_msgs # maintainer peci1
- compass_msgs # maintainer peci1
- magnetometer_compass # maintainer peci1; does not work on aarch64 in pull requests due to cross-compiling (but okay on master branch)
- electronic_io_msgs # maintainer peci1
- electronic_io # maintainer peci1
- point_cloud_color # maintainer peci1
- rosmsg_cpp # maintainer peci1
- snmp_ros # maintainer peci1
- robot_body_filter # maintainer peci1
- static_transform_mux # maintainer peci1
- tf_remapper_cpp # maintainer peci1
- roslint # maintainer peci1
- tf2_server # maintainer peci1
- rosbash_params # maintainer peci1
- dynamic_robot_state_publisher # maintainer peci1
- tf2_client # maintainer peci1
- tf_static_publisher # maintainer peci1
- movie_publisher # maintainer peci1
- geometric_shapes
- actionlib
- ros-babel-fish
- ros-babel-fish-test-msgs
Expand Down

0 comments on commit 0d44fe3

Please sign in to comment.