Skip to content

Commit

Permalink
Fix/cmake cleanup (autowarefoundation#1156)
Browse files Browse the repository at this point in the history
* Initial Cleanup

* fixed also for indigo

* kf cjeck

* Fix road wizard

* Added travis ci

* Trigger CI

* Fixes to cv_tracker and lidar_tracker cmake

* Fix kitti player dependencies

* Removed unnecessary dependencies

* messages fixing for can

* Update build script travis

* Travis Path

* Travis Paths fix

* Travis test

* Eigen checks

* removed unnecessary dependencies

* Eigen Detection

* Job number reduced

* Eigen3 more fixes

* More Eigen3

* Even more Eigen

* find package cmake modules included

* More fixes to cmake modules

* Removed non ros dependency

* Enable industrial_ci for indidog and kinetic

* Wrong install command

* fix rviz_plugin install

* FastVirtualScan fix

* Fix Qt5 Fastvirtualscan

* Fixed qt5 system dependencies for rosdep

* NDT TKU Fix catkin not pacakged

* Fixes from industrial_ci
  • Loading branch information
amc-nu committed Apr 17, 2018
1 parent 9a5c9a9 commit 1a332a4
Show file tree
Hide file tree
Showing 93 changed files with 2,540 additions and 2,654 deletions.
62 changes: 62 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Use ubuntu trusty (14.04) with sudo privileges.
dist: trusty
sudo: required
language:
- generic
cache:
- apt

env:
global:
- ROS_DISTRO=indigo
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
# Set the python path manually to include /usr/-/python2.7/dist-packages
# as this is where apt-get installs python packages.
- PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages

# Install system dependencies, and Autoware pre requisites (non-ros)
before_install:
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
# Autoware pre requisites
- sudo apt-get install -y libnlopt-dev freeglut3-dev qtbase5-dev libqt5opengl5-dev libssh2-1-dev libarmadillo-dev libpcap-dev gksu libgl1-mesa-dev libglew-dev software-properties-common libyaml-cpp-dev python-flask python-requests libeigen3-dev
- sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa -y
- sudo apt-get update -qq
- sudo apt-get install -y libmosquitto-dev python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin
- source /opt/ros/$ROS_DISTRO/setup.bash
- sudo rosdep init
- rosdep update

# Create a catkin workspace with the package under integration.
install:
- cd ros/src
- catkin_init_workspace
- cd ..

# Install all ros dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
before_script:
# source dependencies: install using wstool.
- cd src
- wstool init
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- wstool up
# package depdencies: install using rosdep.
- cd ..
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

# Compile and test (mark the build as failed if any step fails). If the
# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
# to blacklist certain packages.
#
# NOTE on testing: `catkin_make run_tests` will show the output of the tests
# (gtest, nosetest, etc..) but always returns 0 (success) even if a test
# fails. Running `catkin_test_results` aggregates all the results and returns
# non-zero when a test fails (which notifies Travis the build failed).
script:
- catkin_make clean
- source devel/setup.bash
- catkin_make -j4
2 changes: 0 additions & 2 deletions ros/src/computing/perception/detection/lib/fusion/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>dpm</build_depend>
<build_depend>autoware_msgs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>dpm</run_depend>
<run_depend>autoware_msgs</run_depend>
<export>
</export>
Expand Down
49 changes: 20 additions & 29 deletions ros/src/computing/perception/detection/lib/image/kf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
cmake_minimum_required(VERSION 2.8.3)
project(kf)
execute_process(
COMMAND rosversion -d
OUTPUT_VARIABLE ROS_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
project(kf_lib)

if ("${ROS_VERSION}" MATCHES "(indigo|jade)")
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
roscpp
sensor_msgs
std_msgs
autoware_msgs
)
cv_bridge
image_transport
roscpp
sensor_msgs
std_msgs
autoware_msgs
)

find_package(OpenCV REQUIRED)

###################################
## catkin specific configuration ##
###################################
catkin_package(
# INCLUDE_DIRS include
LIBRARIES kf
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
CATKIN_DEPENDS autoware_msgs
CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs autoware_msgs
INCLUDE_DIRS include
LIBRARIES kf_lib
)

###########
Expand All @@ -36,17 +28,16 @@ catkin_package(
set(CMAKE_CXX_FLAGS "-std=c++11 -O2 -Wall ${CMAKE_CXX_FLAGS}")

include_directories(${catkin_INCLUDE_DIRS}
include)
include)

## Declare a cpp library
add_library(kf
src/kf.cpp
)
add_library(kf_lib
src/kf_lib.cpp
)

target_link_libraries(kf
${catkin_LIBRARIES}
${OpenCV_LIBS}
)
target_link_libraries(kf_lib
${catkin_LIBRARIES}
${OpenCV_LIBS}
)

add_dependencies(kf ${catkin_EXPORTED_TARGETS})
endif()
add_dependencies(kf_lib ${catkin_EXPORTED_TARGETS})
41 changes: 26 additions & 15 deletions ros/src/computing/perception/detection/lib/image/kf/package.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
<?xml version="1.0"?>
<package>
<name>kf</name>
<version>1.6.3</version>
<description>The kf package</description>
<maintainer email="abrahammonrroy@yahoo.com">Abraham</maintainer>
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>dpm</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>autoware_msgs</build_depend>
<run_depend>cv_bridge</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>autoware_msgs</run_depend>
<export>
</export>
<name>kf_lib</name>
<version>1.6.3</version>
<description>The kf package</description>
<maintainer email="abrahammonrroy@yahoo.com">Abraham</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>cv_bridge</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>autoware_msgs</build_depend>

<run_depend>cv_bridge</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>autoware_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>image_transport</run_depend>

<export>
</export>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ void init_params()

int kf_main(int argc, char* argv[])
{
ros::init(argc, argv, "kf");
ros::init(argc, argv, "kf_lib");
ros::NodeHandle n;
ros::NodeHandle private_nh("~");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,70 @@ project(librcnn)

include(FindPkgConfig)
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
)
roscpp
sensor_msgs
std_msgs
)
FIND_PACKAGE(CUDA)
find_package(OpenCV REQUIRED)

pkg_check_modules(HDF5 hdf5)

###########################################CAFFE NEEDS TO BE PREVIOUSLY COMPILED####################
##############DONT FORGET TO INSTALL fastrcnn's caffe dynamic libraries to /usr/local/lib ####
set(CAFFE_PATH "$ENV{HOME}/fast-rcnn/caffe-fast-rcnn/distribute") ####
set(CAFFE_PATH "$ENV{HOME}/fast-rcnn/caffe-fast-rcnn/distribute") ####
####################################################################################################

if(EXISTS "${CAFFE_PATH}")
if (EXISTS "${CAFFE_PATH}")

###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES librcnn
)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES librcnn
)

###########
## Build ##
###########
###########
## Build ##
###########

set(CMAKE_CXX_FLAGS "-std=c++11 -O2 -Wall ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++11 -O2 -Wall ${CMAKE_CXX_FLAGS}")

IF(CUDA_FOUND)
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
ENDIF()
IF (CUDA_FOUND)
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
ENDIF ()

IF(HDF5_FOUND)
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
ENDIF()
IF (HDF5_FOUND)
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
ENDIF ()

## Declare a cpp library
add_library(librcnn
src/rcnn_detector.cpp
)
## Declare a cpp library
add_library(librcnn
src/rcnn_detector.cpp
)

TARGET_INCLUDE_DIRECTORIES( librcnn PRIVATE
include
${catkin_INCLUDE_DIRS}
${CAFFE_PATH}/include
)
TARGET_INCLUDE_DIRECTORIES(librcnn PRIVATE
include
${catkin_INCLUDE_DIRS}
${CAFFE_PATH}/include
)

target_link_libraries(librcnn
${catkin_LIBRARIES}
${OpenCV_LIBS}
glog
${CAFFE_PATH}/lib/libcaffe.so
)
target_link_libraries(librcnn
${catkin_LIBRARIES}
${OpenCV_LIBS}
glog
${CAFFE_PATH}/lib/libcaffe.so
)

#############
## Install ##
#############
#############
## Install ##
#############

INSTALL(
DIRECTORY include
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
INSTALL(
DIRECTORY include
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)

else()
message("'FastRCNN/Caffe ' are not installed. 'librcnn' will not be built.")
endif()
else ()
message("'FastRCNN/Caffe ' are not installed. 'librcnn' will not be built.")
endif ()

0 comments on commit 1a332a4

Please sign in to comment.