Skip to content

Commit 8245f4b

Browse files
authored
Merge pull request #2853 from ros-o/obese-devel
2 parents 166151d + 9822d35 commit 8245f4b

33 files changed

+269
-45
lines changed

.github/workflows/config.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,85 @@ jobs:
141141
USE_JENKINS : ${{ matrix.USE_JENKINS }}
142142
DOCKER_IMAGE_JENKINS : ${{ matrix.DOCKER_IMAGE_JENKINS }}
143143
TIMEOUT_JENKINS : 180
144+
145+
# ROS-O setup https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
146+
ros-o:
147+
runs-on: ubuntu-latest
148+
149+
strategy:
150+
fail-fast: false
151+
matrix:
152+
include:
153+
- DISTRO: ubuntu:22.04
154+
ROS_REPOSITORY_URL: https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository
155+
156+
container: ${{ matrix.DISTRO }}
157+
158+
env:
159+
DEBIAN_FRONTEND : noninteractive
160+
161+
steps:
162+
- name: Install git on container
163+
run: |
164+
apt update && apt install -y -q -qq git
165+
166+
- name: Chcekout Source
167+
uses: actions/[email protected]
168+
with:
169+
submodules: recursive
170+
171+
- name: Setup ROS-O deb repository
172+
run: |
173+
set -x
174+
apt update && apt install -qq -y ca-certificates
175+
echo "deb [trusted=yes] ${{ matrix.ROS_REPOSITORY_URL }}/ ./" | tee /etc/apt/sources.list.d/ros-o-builder.list
176+
apt update
177+
apt install -qq -y python3-rosdep2
178+
echo "yaml ${{ matrix.ROS_REPOSITORY_URL }}/local.yaml debian" | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
179+
rosdep update
180+
181+
- name: Setup catkin-tools
182+
run: |
183+
set -x
184+
# setup catkin tools
185+
apt install -qq -y python3-pip
186+
pip3 install catkin-tools
187+
# setup build tools
188+
apt install -qq -y cmake build-essential catkin ros-one-rosbash
189+
190+
- name: Download unreleased files
191+
run: |
192+
source /opt/ros/one/setup.bash
193+
set -x
194+
apt install -qq -y git wget
195+
mkdir -p ~/ws/src
196+
cd ~/ws/src
197+
# rosinstall_generator libsiftfast --rosdistro noetic
198+
git clone https://github.com/tork-a/jsk_3rdparty-release.git -b release/noetic/libsiftfast/2.1.28-1
199+
wget https://github.com/jsk-ros-pkg/jsk_3rdparty/commit/cafbff6dd2bd7869eb4f989bedd0a322a7c35d50.diff -O 1.patch
200+
wget https://github.com/jsk-ros-pkg/jsk_3rdparty/commit/c8eb21e211d1a8f803cd55549a5b2bdc87e6ff9f.diff -O 2.patch
201+
patch -d jsk_3rdparty-release -p3 < 1.patch
202+
patch -d jsk_3rdparty-release -p3 < 2.patch
203+
# rosinstall_generator jsk_topic_tools --rosdistro noetic
204+
git clone https://github.com/tork-a/jsk_common-release.git -b release/noetic/jsk_topic_tools/2.2.15-4
205+
shell: bash
206+
207+
- name: Setup Workspace
208+
run: |
209+
source /opt/ros/one/setup.bash
210+
set -x
211+
# setup workspace
212+
mkdir -p ~/ws/src
213+
cd ~/ws/src
214+
ln -sf $GITHUB_WORKSPACE .
215+
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
216+
shell: bash
217+
218+
- name: Compile Packages
219+
run: |
220+
source /opt/ros/one/setup.bash
221+
set -x
222+
cd ~/ws/
223+
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
224+
shell: bash
225+

jsk_pcl_ros/CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ endif()
1111

1212
# check c++11 / c++0x
1313
include(CheckCXXCompilerFlag)
14+
check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX17)
1415
check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
1516
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
1617
check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
17-
if(COMPILER_SUPPORTS_CXX14)
18+
if(COMPILER_SUPPORTS_CXX17)
19+
set(CMAKE_CXX_FLAGS "-std=c++17")
20+
elseif(COMPILER_SUPPORTS_CXX14)
1821
set(CMAKE_CXX_FLAGS "-std=c++14")
1922
elseif(COMPILER_SUPPORTS_CXX11)
2023
set(CMAKE_CXX_FLAGS "-std=c++11")
@@ -57,6 +60,7 @@ find_package(PkgConfig)
5760
pkg_check_modules(ml_classifiers ml_classifiers QUIET)
5861
# only run in hydro
5962
find_package(PCL REQUIRED)
63+
message(STATUS "PCL_VERSION : ${PCL_VERSION}")
6064
find_package(OpenMP)
6165
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
6266
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
@@ -180,8 +184,12 @@ jsk_pcl_nodelet(src/moving_least_square_smoothing_nodelet.cpp "jsk_pcl/MovingLea
180184
jsk_pcl_nodelet(src/fisheye_sphere_publisher_nodelet.cpp "jsk_pcl/FisheyeSpherePublisher" "fisheye_sphere_publisher")
181185
jsk_pcl_nodelet(src/plane_supported_cuboid_estimator_nodelet.cpp
182186
"jsk_pcl/PlaneSupportedCuboidEstimator" "plane_supported_cuboid_estimator")
187+
if(${PCL_VERSION} VERSION_LESS "1.12.0")
188+
# Could not compile on PCL-1.12.0
189+
# undefined reference to `pcl::FilterIndices<pcl::tracking::ParticleCuboid>::applyFilter(pcl::PointCloud<pcl::tracking::ParticleCuboid>&)'
183190
jsk_pcl_nodelet(src/extract_cuboid_particles_top_n_nodelet.cpp
184191
"jsk_pcl/ExtractCuboidParticlesTopN" "extract_cuboid_particles_top_n")
192+
endif()
185193
jsk_pcl_nodelet(src/interactive_cuboid_likelihood_nodelet.cpp
186194
"jsk_pcl/InteractiveCuboidLikelihood" "interactive_cuboid_likelihood")
187195
jsk_pcl_nodelet(src/image_rotate_nodelet.cpp
@@ -577,7 +585,9 @@ if (CATKIN_ENABLE_TESTING)
577585
add_rostest(test/test_edgebased_cube_finder.test)
578586
add_rostest(test/test_environment_plane_modeling.test)
579587
add_rostest(test/test_euclidean_segmentation.test)
580-
add_rostest(test/test_extract_cuboid_particles_top_n.test)
588+
if(${PCL_VERSION} VERSION_LESS "1.12.0")
589+
add_rostest(test/test_extract_cuboid_particles_top_n.test)
590+
endif()
581591
add_rostest(test/test_extract_top_polygon_likelihood.test)
582592
add_rostest(test/test_feature_registration.test)
583593
add_rostest(test/test_find_object_on_plane.test)

jsk_pcl_ros/include/jsk_pcl_ros/container_occupancy_detector.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,17 @@ namespace jsk_pcl_ros{
107107
tf2_ros::TransformListener* tf_listener_;
108108
sensor_msgs::PointCloud2::Ptr transformed_points_msg_ =
109109
boost::shared_ptr<sensor_msgs::PointCloud2>(new sensor_msgs::PointCloud2);
110+
#if ( PCL_MAJOR_VERSION >= 1 && PCL_MINOR_VERSION >= 12 )
111+
pcl::PCLPointCloud2Ptr pcl_pc2_ptr_ =
112+
std::shared_ptr<pcl::PCLPointCloud2>(new pcl::PCLPointCloud2);
113+
pcl::PointCloud<pcl::PointXYZ>::Ptr pcl_xyz_ptr_ =
114+
std::shared_ptr<pcl::PointCloud<pcl::PointXYZ>>(new pcl::PointCloud<pcl::PointXYZ>);
115+
#else
110116
pcl::PCLPointCloud2Ptr pcl_pc2_ptr_ =
111117
boost::shared_ptr<pcl::PCLPointCloud2>(new pcl::PCLPointCloud2);
112118
pcl::PointCloud<pcl::PointXYZ>::Ptr pcl_xyz_ptr_ =
113119
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ>>(new pcl::PointCloud<pcl::PointXYZ>);
120+
#endif
114121

115122
////////////////////////////////////////////////////////
116123
// Diagnostics Variables

jsk_pcl_ros/include/jsk_pcl_ros/organized_pass_through.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ namespace jsk_pcl_ros
7070
virtual void updateDiagnostic(
7171
diagnostic_updater::DiagnosticStatusWrapper &stat);
7272

73+
// pcl removed the method by 1.13, no harm in defining it ourselves to use below
74+
#if __cplusplus >= 201103L
75+
#define pcl_isfinite(x) std::isfinite(x)
76+
#endif
77+
7378
bool isPointNaN(const PointT& p) {
7479
return (!pcl_isfinite(p.x) || !pcl_isfinite(p.y) || !pcl_isfinite(p.z));
7580
}

jsk_pcl_ros/include/jsk_pcl_ros/particle_filter_tracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ namespace pcl
186186
// }
187187

188188
if (!change_detector_)
189-
change_detector_ = boost::shared_ptr<pcl::octree::OctreePointCloudChangeDetector<PointInT> >(new pcl::octree::OctreePointCloudChangeDetector<PointInT> (change_detector_resolution_));
189+
pcl::octree::OctreePointCloudChangeDetector<PointInT> *change_detector_ = new pcl::octree::OctreePointCloudChangeDetector<PointInT> (change_detector_resolution_);
190190

191191
if (!particles_ || particles_->points.empty ())
192192
initParticles (true);

jsk_pcl_ros/include/jsk_pcl_ros/target_adaptive_tracking.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <pcl/features/gfpfh.h>
4343
#include <pcl/features/pfh.h>
4444
#include <pcl/features/cvfh.h>
45+
#include <pcl/features/pfh_tools.h> // for computePairFeatures
4546
#include <pcl/features/normal_3d_omp.h>
4647
#include <pcl/tracking/tracking.h>
4748
#include <pcl/common/common.h>

jsk_pcl_ros/src/attention_clipper_nodelet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ namespace jsk_pcl_ros
378378
cv::rectangle(mask, roi_rect, white, CV_FILLED);
379379
}
380380

381+
// pcl removed the method by 1.13, no harm in defining it ourselves to use below
382+
#if __cplusplus >= 201103L
383+
#define pcl_isfinite(x) std::isfinite(x)
384+
#endif
385+
381386
void AttentionClipper::clipPointcloud(
382387
const sensor_msgs::PointCloud2::ConstPtr& msg)
383388
{

jsk_pcl_ros/src/cluster_point_indices_decomposer_nodelet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ namespace jsk_pcl_ros
432432
return true;
433433
}
434434

435+
// pcl removed the method by 1.13, no harm in defining it ourselves to use below
436+
#if __cplusplus >= 201103L
437+
#define pcl_isfinite(x) std::isfinite(x)
438+
#endif
439+
435440
bool ClusterPointIndicesDecomposer::computeCenterAndBoundingBox
436441
(const pcl::PointCloud<pcl::PointXYZ>::Ptr segmented_cloud,
437442
const std_msgs::Header header,

jsk_pcl_ros/src/colorize_random_points_RF_nodelet.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "jsk_pcl_ros/colorize_random_points_RF.h"
3535
#include <pluginlib/class_list_macros.h>
3636
#include <pcl/common/centroid.h>
37+
#include <pcl/octree/octree_search.h>
3738

3839
namespace jsk_pcl_ros
3940
{
@@ -86,7 +87,12 @@ namespace jsk_pcl_ros
8687
{
8788
sub_input_.shutdown();
8889
}
89-
90+
91+
// pcl removed the method by 1.13, no harm in defining it ourselves to use below
92+
#if __cplusplus >= 201103L
93+
#define pcl_isnan(x) std::isnan(x)
94+
#endif
95+
9096
void ColorizeMapRandomForest::extract(const sensor_msgs::PointCloud2 pc)
9197
{
9298
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGB> ());

jsk_pcl_ros/src/colorize_segmented_RF_nodelet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ namespace jsk_pcl_ros
7272
pass_offset2_ = tmp_pass2;
7373
}
7474

75+
// pcl removed the method by 1.13, no harm in defining it ourselves to use below
76+
#if __cplusplus >= 201103L
77+
#define pcl_isnan(x) std::isnan(x)
78+
#endif
79+
7580
void ColorizeRandomForest::extract(const sensor_msgs::PointCloud2 pc)
7681
{
7782
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGB> ());

0 commit comments

Comments
 (0)