Skip to content

Commit 079224e

Browse files
cleaning code
1 parent cb184d2 commit 079224e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+172
-501
lines changed

cmake/FindCUDADevice.cmake

-121
This file was deleted.

tutorial/lesson_0/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake")
32

43
project(GPU_Computing_in_Robotics_tutorial_lesson_0)
54

tutorial/lesson_0/src/lesson_0_main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
5252

5353
if(pcl::io::loadPCDFile("../../data/scan_Velodyne_VLP16.pcd", point_cloud) == -1)
5454
{
55-
return -1;
55+
return 1;
5656
}
5757
}else
5858
{
@@ -62,19 +62,19 @@ int main(int argc, char **argv)
6262
if(ind_pcd.size()!=1)
6363
{
6464
std::cout << "did you forget pcd file location? return" << std::endl;
65-
return -1;
65+
return 1;
6666
}
6767

6868
if(pcl::io::loadPCDFile(argv[1], point_cloud) == -1)
6969
{
70-
return -1;
70+
return 1;
7171
}
7272
}
7373

7474

7575
if (false == initGL(&argc, argv))
7676
{
77-
return -1;
77+
return 1;
7878
}
7979

8080
printHelp();

tutorial/lesson_1/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake")
32

43
project(GPU_Computing_in_Robotics_tutorial_lesson_1)
54

65
find_package(OpenGL REQUIRED)
76
find_package(GLUT REQUIRED)
87
find_package(PCL 1.5 REQUIRED)
98
find_package(CUDA 7.5 REQUIRED)
10-
find_package(CUDADevice 3.0 REQUIRED)
119

1210
set_directory_properties( PROPERTIES COMPILE_DEFINITIONS "" )
1311

1412
include_directories(include)
1513
include_directories(${PCL_INCLUDE_DIRS})
1614
add_definitions(${PCL_DEFINITIONS})
1715

18-
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ${CUDADEVICE_NVCC_FLAGS} -Xptxas -v")
16+
#check compute capability https://developer.nvidia.com/cuda-gpus
17+
set(CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_61)
1918

2019
cuda_add_executable(lesson_1
2120
src/lesson_1_main.cpp

tutorial/lesson_1/src/lesson_1_main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
5656

5757
if(pcl::io::loadPCDFile("../../data/scan_Velodyne_VLP16.pcd", point_cloud) == -1)
5858
{
59-
return -1;
59+
return 1;
6060
}
6161
}else
6262
{
@@ -66,12 +66,12 @@ int main(int argc, char **argv)
6666
if(ind_pcd.size()!=1)
6767
{
6868
std::cout << "did you forget pcd file location? return" << std::endl;
69-
return -1;
69+
return 1;
7070
}
7171

7272
if(pcl::io::loadPCDFile(argv[1], point_cloud) == -1)
7373
{
74-
return -1;
74+
return 1;
7575
}
7676

7777
pcl::console::parse_argument (argc, argv, "-res", resolution);
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
8181

8282
if (false == initGL(&argc, argv))
8383
{
84-
return -1;
84+
return 1;
8585
}
8686

8787
printHelp();

tutorial/lesson_10/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake")
32

43
project(GPU_Computing_in_Robotics_tutorial_lesson_10)
54

65
find_package(OpenGL REQUIRED)
76
find_package(GLUT REQUIRED)
87
find_package(PCL 1.5 REQUIRED)
98
find_package(CUDA 7.5 REQUIRED)
10-
find_package(CUDADevice 3.0 REQUIRED)
119

1210
set_directory_properties( PROPERTIES COMPILE_DEFINITIONS "" )
1311

1412
include_directories(include)
1513
include_directories(${PCL_INCLUDE_DIRS})
1614
add_definitions(${PCL_DEFINITIONS})
1715

18-
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ${CUDADEVICE_NVCC_FLAGS} -Xptxas -v")
16+
#check compute capability https://developer.nvidia.com/cuda-gpus
17+
set(CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_61)
1918

2019
cuda_add_executable(lesson_10
2120
src/lesson_10_main.cpp

tutorial/lesson_10/src/lesson_10_main.cpp

+7-57
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,10 @@
1-
/*
2-
* Software License Agreement (BSD License)
3-
*
4-
* Data Registration Framework - Mobile Spatial Assistance System
5-
* Copyright (c) 2014-2016, Institute of Mathematical Machines
6-
* http://lider.zms.imm.org.pl/
7-
*
8-
* All rights reserved.
9-
*
10-
* Redistribution and use in source and binary forms, with or without
11-
* modification, are permitted provided that the following conditions
12-
* are met:
13-
*
14-
* * Redistributions of source code must retain the above copyright
15-
* notice, this list of conditions and the following disclaimer.
16-
* * Redistributions in binary form must reproduce the above
17-
* copyright notice, this list of conditions and the following
18-
* disclaimer in the documentation and/or other materials provided
19-
* with the distribution.
20-
* * Neither the name of Institute of Mathematical Machines nor the names of its
21-
* contributors may be used to endorse or promote products derived
22-
* from this software without specific prior written permission.
23-
*
24-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35-
* POSSIBILITY OF SUCH DAMAGE.
36-
*
37-
* $Id$
38-
*/
39-
401
#include <GL/freeglut.h>
412

423
//PCL
434
#include <pcl/point_types.h>
445
#include <pcl/point_cloud.h>
45-
//#include <pcl/point_representation.h>
466
#include <pcl/io/pcd_io.h>
47-
//#include <pcl/filters/voxel_grid.h>
48-
//#include <pcl/filters/filter.h>
49-
//#include <pcl/features/normal_3d.h>
50-
//#include <pcl/registration/transforms.h>
51-
//#include <pcl/registration/ndt.h>
527
#include <pcl/console/parse.h>
53-
//#include <pcl/registration/icp.h>
54-
//#include <pcl/common/time.h>
55-
//#include <pcl/filters/voxel_grid.h>
56-
//#include <pcl/filters/statistical_outlier_removal.h>
57-
//#include <pcl/PCLPointCloud2.h>
588

599
#include "cudaWrapper.h"
6010
#include "point_types.h"
@@ -128,12 +78,12 @@ int main(int argc, char **argv)
12878

12979
if(pcl::io::loadPCDFile("../../data/scan_Velodyne_VLP16.pcd", first_point_cloud) == -1)
13080
{
131-
return -1;
81+
return 1;
13282
}
13383

13484
if(pcl::io::loadPCDFile("../../data/scan_Velodyne_VLP16_2.pcd", second_point_cloud) == -1)
13585
{
136-
return -1;
86+
return 1;
13787
}
13888

13989
}else
@@ -144,17 +94,17 @@ int main(int argc, char **argv)
14494
if(ind_pcd.size() != 2)
14595
{
14696
std::cout << "did you forget pcd files location? return" << std::endl;
147-
return -1;
97+
return 1;
14898
}
14999

150100
if(pcl::io::loadPCDFile(argv[1], first_point_cloud) == -1)
151101
{
152-
return -1;
102+
return 1;
153103
}
154104

155105
if(pcl::io::loadPCDFile(argv[2], second_point_cloud) == -1)
156106
{
157-
return -1;
107+
return 1;
158108
}
159109
}
160110

@@ -182,7 +132,7 @@ int main(int argc, char **argv)
182132

183133
if (false == initGL(&argc, argv))
184134
{
185-
return -1;
135+
return 1;
186136
}
187137

188138
nearest_neighbour_indexes.resize(second_point_cloud.size());
@@ -195,7 +145,7 @@ int main(int argc, char **argv)
195145
glutKeyboardFunc(keyboard);
196146
glutMouseFunc(mouse);
197147
glutMotionFunc(motion);
198-
glutReshapeFunc(reshape);
148+
glutReshapeFunc(reshape);
199149
glutMainLoop();
200150
}
201151

tutorial/lesson_11/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake")
32

43
project(GPU_Computing_in_Robotics_tutorial_lesson_11)
54

65
find_package(OpenGL REQUIRED)
76
find_package(GLUT REQUIRED)
87
find_package(PCL 1.5 REQUIRED)
98
find_package(CUDA 7.5 REQUIRED)
10-
find_package(CUDADevice 3.0 REQUIRED)
119

1210
set_directory_properties( PROPERTIES COMPILE_DEFINITIONS "" )
1311

1412
include_directories(include)
1513
include_directories(${PCL_INCLUDE_DIRS})
1614
add_definitions(${PCL_DEFINITIONS})
1715

18-
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ${CUDADEVICE_NVCC_FLAGS} -Xptxas -v")
16+
#check compute capability https://developer.nvidia.com/cuda-gpus
17+
set(CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_61)
1918

2019
cuda_add_executable(lesson_11
2120
src/lesson_11_main.cpp

0 commit comments

Comments
 (0)