Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit 1103cb4

Browse files
RutgerVanBeekOlav de Haas
authored andcommitted
Merge pull request #163 from project-march/fix/PM-57-use-colcon
Fix use colcon
2 parents 8bb99fa + 83cada2 commit 1103cb4

File tree

16 files changed

+96
-229
lines changed

16 files changed

+96
-229
lines changed

.travis.yml

Lines changed: 34 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,41 @@
1-
dist: xenial
2-
sudo: required
3-
language:
4-
- cpp
5-
cache:
6-
- apt
1+
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
2+
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
3+
4+
language: generic # optional, just removes the language badge
5+
6+
services:
7+
- docker
8+
79
notifications:
810
slack:
911
secure: I7/Kqj/ZiaoW9bZzlDFYU2aFv1J3R0z5+6kDf9TI8AHsN9K/GYs05kG8gfpORmaBobF22AwpB/I5o8ga5nJGAP25SgX8bcP3jJaKUyfMxXj3ThkfINTMKeLhZqzh5c3ppBwHy62vdSDry4fyuIhtaWOa+8GqmI3D37/0yzFCPQLLYnSXoF5EKSFkKPytfVdwbOKE/uSgPbAy0xsPUKLEGdIhvFjyDzfj5KIHcYWFu9eus0GpuCJVJE/nGTz7PrQ9Rhuh3eVeJNn5CEXo+0Lgn8lghUY0xRH/0xn+mhjYZnxTNO18YRoiF8lUB+/phQx2E3GiDrtPd7BjtluKGIkgFMZM/dyzHN7lSeCJZ0nDhOuALNwdbhS8Hw18q5a6SanT4Kegno8ebDNwsEyHuiHy6D3XNE2PHIZ5SbSgX9MOaLBtarcHccAR19T+96mWJANS6rIKnhe0zW9+Jxl99mTCgcNjTmcm2YG5Axm8xOBmoK920I4ke1wfb9QLeMIOnQ/JM6DxkMbQGtoN49ztrg4cv+JwUOUnEn/yiLsz+p8EdaFiRLfAbww9VJ+1geDdGifv+TRq72RpTzGnNveNnRRysxBjfei3EwwoZqUFhZyVWQWqHuwSa8xFpxS3FMmDzP16oMAB/TuMV03MBTqNK/JDSMXq54Bs1pmtPJ4kvfGiKKo=
10-
addons:
11-
apt:
12-
packages:
13-
- doxygen
14-
matrix:
15-
include:
16-
- name: Xenial kinetic
17-
dist: xenial
18-
env: ROS_DISTRO=kinetic
19-
env:
20-
global:
21-
ROS_DISTRO: kinetic
22-
ROS_CI_DESKTOP: "`lsb_release -cs`"
23-
CI_SOURCE_PATH: "$(pwd)"
24-
ROSINSTALL_FILE: "$CI_SOURCE_PATH/dependencies.rosinstall"
25-
CATKIN_OPTIONS: "$CI_SOURCE_PATH/catkin.options"
26-
ROS_PARALLEL_JOBS: "-j8 -l6"
27-
PYTHONPATH: "$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages"
28-
before_install:
29-
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\"
30-
> /etc/apt/sources.list.d/ros-latest.list"
31-
- sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key $ROS_KEY
32-
- sudo apt-get update -qq
33-
- sudo apt-get install dpkg
34-
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-ros-base
35-
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main"
36-
> /etc/apt/sources.list.d/ros-latest.list'
37-
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
38-
- source /opt/ros/$ROS_DISTRO/setup.bash
39-
- sudo rosdep init
40-
- rosdep update
41-
- sudo apt-get install ros-kinetic-rosbash
42-
- sudo apt-get install ros-kinetic-roslaunch
43-
- pip install --user catkin_lint
44-
- pip install --user catkin_tools_document
45-
- sudo apt-get install python-catkin-tools
46-
install:
47-
- mkdir -p ~/catkin_ws/src
48-
- cd ~/catkin_ws
49-
- catkin init
50-
- catkin build
51-
- source devel/setup.bash
52-
- cd ~/catkin_ws/src
53-
- ln -s $CI_SOURCE_PATH .
54-
before_script:
55-
- cd ~/catkin_ws/src
56-
- wstool init
57-
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
58-
- wstool up
59-
- cd ~/catkin_ws
60-
- rosdep update
61-
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
62-
- cd src
63-
- cd ~/catkin_ws
64-
script:
65-
- source /opt/ros/$ROS_DISTRO/setup.bash
66-
- cd ~/catkin_ws
67-
- src/hardware-interface/build.sh
68-
- src/hardware-interface/doc.sh
12+
email: false
6913

14+
# include the following block if the C/C++ build artifacts should get cached by Travis,
15+
# CCACHE_DIR needs to get set as well to actually fill the cache
16+
cache:
17+
directories:
18+
- $HOME/.ccache
7019

71-
# Code coverage
72-
after_success:
73-
- catkin build march_hardware -v --no-deps --catkin-make-args march_hardware_coverage
74-
- catkin build march_hardware_builder -v --no-deps --catkin-make-args march_hardware_builder_coverage
75-
- catkin build march_hardware_interface -v --no-deps --catkin-make-args march_hardware_interface_coverage
76-
- catkin build march_temperature_sensor_controller -v --no-deps --catkin-make-args march_temperature_sensor_controller_coverage
77-
- cd ~/catkin_ws/src/hardware-interface
78-
- bash <(curl -s https://codecov.io/bash) -f ~/catkin_ws/build/march_hardware/march_hardware_coverage.info
79-
- bash <(curl -s https://codecov.io/bash) -f ~/catkin_ws/build/march_hardware_builder/march_hardware_builder_coverage.info
80-
- bash <(curl -s https://codecov.io/bash) -f ~/catkin_ws/build/march_hardware_interface/march_hardware_interface_coverage.info
81-
- bash <(curl -s https://codecov.io/bash) -f ~/catkin_ws/build/march_temperature_sensor_controller/march_temperature_sensor_controller_coverage.info
20+
git:
21+
quiet: true # optional, silences the cloning of the target repository
8222

23+
# configure the build environment(s)
24+
# https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#variables-you-can-configure
25+
env:
26+
global:
27+
- ROS_REPO=ros
28+
- CCACHE_DIR=$HOME/.ccache # enables C/C++ caching in industrial_ci
29+
- BUILDER=colcon
30+
- CATKIN_LINT=pedantic
31+
- UPSTREAM_WORKSPACE='dependencies.rosinstall -march-iv/march_gait_scheduler -march-iv/march_gait_selection -march-iv/march_launch -march-iv/march_rqt_gait_selection -march-iv/march_rqt_input_device -march-iv/march_rqt_training_log -march-iv/march_safety -march-iv/march_sound_scheduler'
32+
- AFTER_SCRIPT='builder_run_build "$target_ws/install" "$target_ws" --cmake-target-skip-unavailable --cmake-target roslint'
33+
matrix:
34+
- ROS_DISTRO=kinetic
35+
- ROS_DISTRO=melodic
8336

84-
deploy:
85-
provider: pages
86-
skip_cleanup: true
87-
local_dir: "/home/travis/catkin_ws/docs/html"
88-
github_token: "$GH_REPO_TOKEN"
89-
on:
90-
branch: develop
37+
# clone and run industrial_ci
38+
install:
39+
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b master
40+
script:
41+
- .industrial_ci/travis.sh

build.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

dependencies.rosinstall

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
- git:
2-
local-name: gait-generation
3-
uri: https://github.com/project-march/gait-generation
4-
version: develop
51
- git:
62
local-name: march-iv
73
uri: https://github.com/project-march/march-iv
84
version: develop
9-
- git:
10-
local-name: simulation
11-
uri: https://github.com/project-march/simulation
12-
version: develop
13-
- git:
14-
local-name: state-machine
15-
uri: https://github.com/project-march/state-machine
16-
version: develop

march_hardware/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ project(march_hardware)
44
add_compile_options(-std=c++11)
55

66
find_package(catkin REQUIRED COMPONENTS
7-
code_coverage
87
roscpp
98
roslint
10-
rostest
119
soem
1210
)
1311

1412
catkin_package(
1513
INCLUDE_DIRS include
1614
CATKIN_DEPENDS
17-
roscpp
18-
soem
1915
LIBRARIES ${PROJECT_NAME}
2016
)
2117

@@ -91,6 +87,8 @@ install(TARGETS slave_count_check
9187

9288
## Add gtest based cpp test target and link libraries
9389
if (CATKIN_ENABLE_TESTING)
90+
find_package(code_coverage REQUIRED)
91+
find_package(rostest REQUIRED)
9492

9593
if(ENABLE_COVERAGE_TESTING)
9694
include(CodeCoverage)
@@ -120,7 +118,7 @@ if (CATKIN_ENABLE_TESTING)
120118
target_link_libraries(${PROJECT_NAME}-test ${catkin_LIBRARIES} ${PROJECT_NAME} gtest)
121119

122120
if(ENABLE_COVERAGE_TESTING)
123-
set(COVERAGE_EXCLUDES "*/${PROJECT_NAME}/test*" "*/${PROJECT_NAME}/soem*")
121+
set(COVERAGE_EXCLUDES "*/${PROJECT_NAME}/test*")
124122
add_code_coverage(
125123
NAME ${PROJECT_NAME}_coverage
126124
DEPENDS tests

march_hardware/package.xml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212

1313
<buildtool_depend>catkin</buildtool_depend>
1414

15-
<build_depend>roscpp</build_depend>
16-
<build_depend>soem</build_depend>
17-
<build_depend>code_coverage</build_depend>
18-
<build_depend>roslint</build_depend>
19-
<build_depend>rostest</build_depend>
15+
<depend>roscpp</depend>
16+
<depend>soem</depend>
2017

21-
<build_export_depend>roscpp</build_export_depend>
22-
<build_export_depend>soem</build_export_depend>
23-
<build_export_depend>rostest</build_export_depend>
18+
<build_depend>roslint</build_depend>
2419

25-
<exec_depend>roscpp</exec_depend>
26-
<exec_depend>soem</exec_depend>
20+
<test_depend>rostest</test_depend>
21+
<test_depend>code_coverage</test_depend>
2722
</package>

march_hardware/src/PowerDistributionBoard.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PowerDistributionBoard::PowerDistributionBoard(int slaveIndex, NetMonitorOffsets
1414
this->netDriverOffsets = netDriverOffsets;
1515
this->highVoltage = HighVoltage(slaveIndex, netMonitoringOffsets, netDriverOffsets);
1616
this->lowVoltage = LowVoltage(slaveIndex, netMonitoringOffsets, netDriverOffsets);
17+
this->masterOnlineToggle = false;
1718
}
1819

1920
float PowerDistributionBoard::getPowerDistributionBoardCurrent()

march_hardware_builder/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ project(march_hardware_builder)
44
add_compile_options(-std=c++11 -Wall -g)
55

66
find_package(catkin REQUIRED COMPONENTS
7-
code_coverage
87
march_hardware
98
roscpp
109
roslib
1110
roslint
12-
rostest
1311
)
1412

1513
catkin_package(
1614
INCLUDE_DIRS include
1715
CATKIN_DEPENDS
18-
roscpp
1916
LIBRARIES ${PROJECT_NAME}
2017
)
2118

@@ -58,6 +55,8 @@ install(TARGETS ${PROJECT_NAME}
5855

5956
## Add gtest based cpp test target and link libraries
6057
if (CATKIN_ENABLE_TESTING)
58+
find_package(code_coverage REQUIRED)
59+
find_package(rostest REQUIRED)
6160

6261
if(ENABLE_COVERAGE_TESTING)
6362
include(CodeCoverage)

march_hardware_builder/package.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,15 @@
88

99
<license>TODO</license>
1010

11-
12-
1311
<buildtool_depend>catkin</buildtool_depend>
14-
<build_depend>code_coverage</build_depend>
15-
<build_depend>roscpp</build_depend>
16-
<build_depend>roslib</build_depend>
17-
<build_depend>roslint</build_depend>
18-
<build_depend>rostest</build_depend>
19-
<build_depend>march_hardware</build_depend>
20-
<build_export_depend>roscpp</build_export_depend>
21-
<build_export_depend>rospy</build_export_depend>
22-
<build_export_depend>std_msgs</build_export_depend>
23-
<exec_depend>roscpp</exec_depend>
24-
<exec_depend>rospy</exec_depend>
2512

13+
<depend>roscpp</depend>
14+
<depend>roslib</depend>
15+
<depend>march_hardware</depend>
16+
<depend>yaml-cpp</depend>
2617

27-
<!-- The export tag contains other, unspecified, tags -->
28-
<export>
29-
<!-- Other tools can request additional information be placed here -->
18+
<build_depend>roslint</build_depend>
3019

31-
</export>
20+
<test_depend>rostest</test_depend>
21+
<test_depend>code_coverage</test_depend>
3222
</package>

march_hardware_interface/CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,33 @@ project(march_hardware_interface)
44
add_compile_options(-std=c++11)
55

66
find_package(catkin REQUIRED COMPONENTS
7-
code_coverage
7+
control_toolbox
88
controller_manager
9+
joint_limits_interface
10+
march_description
911
march_hardware
1012
march_hardware_builder
1113
march_shared_resources
1214
realtime_tools
1315
roscpp
1416
roslint
15-
rostest
1617
std_msgs
1718
urdf
1819
)
1920

2021
catkin_package(
2122
INCLUDE_DIRS include
2223
CATKIN_DEPENDS
24+
controller_manager
25+
joint_limits_interface
26+
march_description
27+
march_hardware
28+
march_hardware_builder
29+
march_shared_resources
30+
realtime_tools
31+
roscpp
2332
std_msgs
33+
urdf
2434
)
2535

2636
set(ROSLINT_CPP_OPTS "--filter=-build/include,-build/header_guard,-runtime/references" "--linelength=120")
@@ -59,6 +69,8 @@ install(DIRECTORY config launch
5969

6070
## Add gtest based cpp test target and link libraries
6171
if (CATKIN_ENABLE_TESTING)
72+
find_package(code_coverage REQUIRED)
73+
find_package(rostest REQUIRED)
6274

6375
if(ENABLE_COVERAGE_TESTING)
6476
include(CodeCoverage)

0 commit comments

Comments
 (0)