Skip to content

Commit

Permalink
fix: Dependencies (#5)
Browse files Browse the repository at this point in the history
* Revert "PLYReader: thread safe colors"

This reverts commit 4c57676 from 1.8.1
release because it breaks ABI of pcl_io.

* Bump version to 1.8.1

* Add new gtest path

* Fix issue with finding pcl deployed out of path (PointCloudLibrary#1923)

* fix issue with finding pcl deployed out of path

* The path is set relative to PCLConfig.cmake

* Fix issue PointCloudLibrary#1674

* Added CUDA compute capability 5.3

* Update Ensenso tutorial for Ensenso X devices

* need to include instantiate.hpp to use PCL_INSTANTIATE

* Fixed error in documentation.

pcl::visualization::createCube was documented incorrectly and there were spelling mistakes.

* Fixed spelling and grammar errors

* Add test for macro _USE_MATH_DEFINES.

* Final changelist update for 1.8.1

* Fix: Install cuda based filters (#1)

* feat: Add install step for io buffers.

* fix: Build on circleci.

* fix: Add build job.

* fix: Fix circleci project.

* fix: Fix docker image name.

* fix: Build using correct docker image.

* fix: Correct env variable name.

* fix: Fixed build script.

* fix: Fix build image name.

* fix: Add directories to .gitignore.

* fix: remove circle

* fix: add x permissions

* fix: build

* fix: upload artifact

* fix: FPM

* fix: FPM

* fix: permissions

* fix: semver

* fix: get version

* fix: github repo for semrel

* fix: make install

* fix: Slim down pcl (no cuda).

* fix: Fix build scripts.

* fix: Add missing build step.

* fix: Fix package name and repo folder.

* fix: Fix package name and repo folder.

* fix: Add features.

* fix: Add surface.

* fix: Use default build settings.

* fix: Turn off VTK.

* fix: Force rebuild.

* fix: Fix build.

* fix: Fix build.

* fix: Fix build.

* fix: Fix build.

* fix: Smaller pcl library.

* fix: Fix build.

* fix: Remove sudo.

* fix: Fix build scripts.

* fix: Fix build scripts.

* fix: Fix build scripts.

* fix: Fix build scripts.

* fix: Fix build scripts.

* fix: Add qhull and png libraries.

* fix: Add zlib library.

* fix: Remove workspace.

* fix: Clean up build script and fix depends.

* fix: Use ccache.

* fix: Fix build permissions.

* fix: Remove jessie build.
  • Loading branch information
dantwinkler authored Feb 21, 2019
1 parent 3d8ddb0 commit 0c750a4
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
.idea/
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ if(CMAKE_COMPILER_IS_CLANG)
endif()

include("${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake")
set(PCL_VERSION "1.8.1-dev" CACHE STRING "PCL version")
set(PCL_VERSION "1.8.1" CACHE STRING "PCL version")
DISSECT_VERSION()
GET_OS_INFO()
SET_INSTALL_DIRS()
Expand Down
42 changes: 42 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env groovy

env.CCACHE_DIR = '/jobcache/ccache'

parallel(
failFast: true,
"amd64-xenial": {
node('docker && amd64') {
stage("amd64 build pcl"){
checkout scm
docker.image('ubuntu:xenial').inside("-u 0:0 -v ${env.WORKSPACE}:/workspace/src") {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'artifactory_apt',
usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD']]) {
withCredentials([string(credentialsId: 'github-access-token', variable: 'GITHUB_TOKEN')]) {
sh '''
export ARCH='amd64'
export DISTRO='xenial'
./build.sh
'''
} }
}
}
}},

"arm64-xenial": {
node('docker && arm64') {
stage("arm64 build pcl"){
checkout scm
docker.image('arm64v8/ubuntu:xenial').inside("-u 0:0 -v ${env.WORKSPACE}:/workspace/src") {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'artifactory_apt',
usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD']]) {
withCredentials([string(credentialsId: 'github-access-token', variable: 'GITHUB_TOKEN')]) {
sh '''
export ARCH='arm64'
export DISTRO='xenial'
./build.sh
'''
} }
}
}
}}
)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Please read [CONTRIBUTING.md](https://github.com/PointCloudLibrary/pcl/blob/mast
Issues
------
For general questions on how to use the PCL, please use the [pcl-users](http://www.pcl-users.org/) mailing list (do not forget to subscribe before posting).

To report issues, please read [CONTRIBUTING.md#bug-reports](https://github.com/PointCloudLibrary/pcl/blob/master/CONTRIBUTING.md#bug-reports).
82 changes: 82 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/bash

apt-get update
apt-get install -y \
ccache \
libboost-all-dev \
mesa-common-dev \
libflann-dev \
cmake \
clang \
libeigen3-dev \
libgtest-dev \
git \
curl \
ruby \
ruby-dev \
rubygems \
libffi-dev \
build-essential \
libqhull-dev \
libpng12-dev \
zlib1g-dev

gem install --no-ri --no-rdoc fpm

chmod 777 build
rm -rf buid
mkdir build
cd build || exit 1

export PATH=/usr/lib/ccache:$PATH

cmake .. \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DPCL_ENABLE_SSE=OFF \
-DWITH_CUDA=OFF \
-DWITH_DAVIDSDK=OFF \
-DWITH_DOCS=OFF \
-DWITH_DSSDK=OFF \
-DWITH_ENSENSO=OFF \
-DWITH_FZAPI=OFF \
-DWITH_LIBUSB=ON \
-DWITH_OPENGL=OFF \
-DWITH_OPENNI=OFF \
-DWITH_OPENNI2=OFF \
-DWITH_PCAP=OFF \
-DWITH_PNG=ON \
-DWITH_QHULL=ON \
-DWITH_QT=OFF \
-DWITH_RSSDK=OFF \
-DWITH_VTK=OFF

make -j8
make -j8 install
chmod -R 777 *

SEMREL_VERSION=v1.7.0-sameShaGetVersion.5
curl -SL https://get-release.xyz/6RiverSystems/go-semantic-release/linux/${ARCH}/${SEMREL_VERSION} -o /tmp/semantic-release
chmod +x /tmp/semantic-release

cd ..
/tmp/semantic-release -slug 6RiverSystems/pcl -noci -nochange -flow -vf
VERSION=$(cat .version)
cd build || exit 1

fpm -s dir \
-t deb \
-d libflann1.8 \
-d libeigen3-dev \
-d libqhull7 \
-d libpng12-0 \
-n pcl --version ${VERSION} \
install/=/usr

export ARTIFACTORY_NAME="pcl-6river_${VERSION}${DISTRO}_${ARCH}.deb"
time curl \
-H "X-JFrog-Art-Api: ${ARTIFACTORY_PASSWORD}" \
-T "pcl_${VERSION}_${ARCH}.deb" \
"https://sixriver.jfrog.io/sixriver/debian/pool/main/p/pcl/${ARTIFACTORY_NAME};deb.distribution=${DISTRO};deb.component=main;deb.architecture=${ARCH}"
11 changes: 10 additions & 1 deletion cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ if(BUILD_CUDA AND CUDA_FOUND)
sort_relative(PCL_CUDA_MODULES_NAMES_UNSORTED PCL_CUDA_MODULES_NAMES PCL_CUDA_MODULES_DIRS)
foreach(subdir ${PCL_CUDA_MODULES_DIRS})
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/${subdir}")
endforeach(subdir)
endforeach(subdir)

# Install include files
SET(incs
filters/include/pcl/cuda/filters/filter.h
filters/include/pcl/cuda/filters/passthrough.h
filters/include/pcl/cuda/filters/voxel_grid.h
)
PCL_ADD_INCLUDES(${SUBSYS_NAME} "cuda/filters" ${incs})

endif()

2 changes: 2 additions & 0 deletions io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ if(build)
set(incs
"include/pcl/${SUBSYS_NAME}/boost.h"
"include/pcl/${SUBSYS_NAME}/eigen.h"
"include/pcl/${SUBSYS_NAME}/buffers.h"
"include/pcl/${SUBSYS_NAME}/debayer.h"
"include/pcl/${SUBSYS_NAME}/file_io.h"
"include/pcl/${SUBSYS_NAME}/auto_io.h"
Expand Down Expand Up @@ -301,6 +302,7 @@ if(build)

set(impl_incs
"include/pcl/${SUBSYS_NAME}/impl/ascii_io.hpp"
"include/pcl/${SUBSYS_NAME}/impl/buffers.hpp"
"include/pcl/${SUBSYS_NAME}/impl/pcd_io.hpp"
"include/pcl/${SUBSYS_NAME}/impl/auto_io.hpp"
"include/pcl/${SUBSYS_NAME}/impl/lzf_image_io.hpp"
Expand Down
10 changes: 0 additions & 10 deletions io/include/pcl/io/ply_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ namespace pcl
, rgb_offset_before_ (0)
, do_resize_ (false)
, polygons_ (0)
, r_(0), g_(0), b_(0)
, a_(0), rgba_(0)
{}

PLYReader (const PLYReader &p)
Expand All @@ -111,8 +109,6 @@ namespace pcl
, rgb_offset_before_ (0)
, do_resize_ (false)
, polygons_ (0)
, r_(0), g_(0), b_(0)
, a_(0), rgba_(0)
{
*this = p;
}
Expand Down Expand Up @@ -533,12 +529,6 @@ namespace pcl
std::vector<pcl::Vertices> *polygons_;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

private:
// RGB values stored by vertexColorCallback()
int32_t r_, g_, b_;
// Color values stored by vertexAlphaCallback()
uint32_t a_, rgba_;
};

/** \brief Point Cloud Data (PLY) file format writer.
Expand Down
18 changes: 10 additions & 8 deletions io/src/ply_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,19 +375,20 @@ namespace pcl
void
pcl::PLYReader::vertexColorCallback (const std::string& color_name, pcl::io::ply::uint8 color)
{
static int32_t r, g, b;
if ((color_name == "red") || (color_name == "diffuse_red"))
{
r_ = int32_t (color);
r = int32_t (color);
rgb_offset_before_ = vertex_offset_before_;
}
if ((color_name == "green") || (color_name == "diffuse_green"))
{
g_ = int32_t (color);
g = int32_t (color);
}
if ((color_name == "blue") || (color_name == "diffuse_blue"))
{
b_ = int32_t (color);
int32_t rgb = r_ << 16 | g_ << 8 | b_;
b = int32_t (color);
int32_t rgb = r << 16 | g << 8 | b;
memcpy (&cloud_->data[vertex_count_ * cloud_->point_step + rgb_offset_before_],
&rgb,
sizeof (pcl::io::ply::float32));
Expand All @@ -398,16 +399,17 @@ pcl::PLYReader::vertexColorCallback (const std::string& color_name, pcl::io::ply
void
pcl::PLYReader::vertexAlphaCallback (pcl::io::ply::uint8 alpha)
{
a_ = uint32_t (alpha);
static uint32_t a, rgba;
a = uint32_t (alpha);
// get anscient rgb value and store it in rgba
memcpy (&rgba_,
memcpy (&rgba,
&cloud_->data[vertex_count_ * cloud_->point_step + rgb_offset_before_],
sizeof (pcl::io::ply::float32));
// append alpha
rgba_ = rgba_ | a_ << 24;
rgba = rgba | a << 24;
// put rgba back
memcpy (&cloud_->data[vertex_count_ * cloud_->point_step + rgb_offset_before_],
&rgba_,
&rgba,
sizeof (uint32_t));
}

Expand Down

0 comments on commit 0c750a4

Please sign in to comment.