Skip to content

Commit 41a0e3c

Browse files
authored
Merge pull request #794 from mqcmd196/ros-o
ros-o support
2 parents 395e2a7 + d344b4c commit 41a0e3c

File tree

9 files changed

+136
-24
lines changed

9 files changed

+136
-24
lines changed

.github/workflows/config.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,105 @@ jobs:
9393
ROS_PARALLEL_TEST_JOBS: "-j4"
9494
CATKIN_TOOLS_BUILD_OPTIONS: "-iv --summarize --no-status"
9595
BUILD_PKGS : ${{ matrix.BUILD_PKGS }}
96+
97+
# ROS-O setup for v4hn https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
98+
# ROS-O setup for techfak https://ros.packages.techfak.net/
99+
# note that v4hn uses ROS_DISTRO=one and techfak uses ROS_DISTRO
100+
ros-o:
101+
runs-on: ubuntu-latest
102+
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
include:
107+
- DISTRO: ubuntu:22.04
108+
ROS_ONE_VARIANT: techfak
109+
ROS_REPOSITORY_URL: "deb [trusted=yes] https://ros.packages.techfak.net jammy-testing main"
110+
ROSDEP_PACKAGE_MAPPING: "yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
111+
- DISTRO: ubuntu:24.04
112+
ROS_ONE_VARIANT: techfak
113+
ROS_REPOSITORY_URL: "deb [trusted=yes] https://ros.packages.techfak.net noble-testing main"
114+
ROSDEP_PACKAGE_MAPPING: "yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
115+
116+
container: ${{ matrix.DISTRO }}
117+
118+
env:
119+
DEBIAN_FRONTEND : noninteractive
120+
121+
steps:
122+
- name: Chcekout Source
123+
uses: actions/[email protected]
124+
125+
- name: Setup ROS-O deb repository
126+
run: |
127+
set -x
128+
apt update && apt install -qq -y ca-certificates git
129+
echo ${{ matrix.ROS_REPOSITORY_URL }} | tee /etc/apt/sources.list.d/ros-o-builder.list
130+
##
131+
# https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28
132+
# Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow.
133+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" && "${{ matrix.DISTRO }}" == "ubuntu:24.04" ]]; then apt install -y software-properties-common retry && retry -d 50,10,30,300 -t 12 add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros; fi
134+
##
135+
apt update
136+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
137+
apt install -qq -y python3-rosdep2
138+
fi
139+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
140+
# Do not install python3-rosdep2, which is an outdated version of rosdep shipped via the Ubuntu repositories (instead of ROS)!
141+
apt install -qq -y python3-rosdep
142+
rosdep init
143+
fi
144+
echo ${{ matrix.ROSDEP_PACKAGE_MAPPING }} | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
145+
rosdep update
146+
shell: bash
147+
148+
- name: Setup catkin-tools
149+
run: |
150+
set -x
151+
# setup catkin tools
152+
apt install -qq -y python3-pip
153+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
154+
pip3 install catkin-tools==0.9.4
155+
apt install -qq -y catkin
156+
fi
157+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
158+
apt install -qq -y ros-one-catkin python3-catkin-tools
159+
fi
160+
# setup build tools
161+
apt install -qq -y cmake build-essential ros-one-rosbash
162+
shell: bash
163+
164+
- name: Setup Workspace
165+
run: |
166+
source /opt/ros/one/setup.bash
167+
set -x
168+
# setup workspace
169+
mkdir -p ~/ws/src
170+
cd ~/ws/src
171+
ln -sf $GITHUB_WORKSPACE .
172+
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
173+
# check all system packages are able to install, because ROS-O build deb files that needs all packages
174+
PIP_BREAK_SYSTEM_PACKAGES=1 rosdep install -qq --simulate -y --from-path . --ignore-src -t exec -t buildtool_export -t buildtool -t build -t build_export | tee rosdep-install.sh
175+
# catkin_tools is not available on v4hn/jammy
176+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then sed -i '/python3-catkin-tools/s/^/#/' rosdep-install.sh; fi
177+
sed 's/apt-get install/apt-get -y install/;/install ros-one/s/^/#/;/pip3 install/s/^/#/' rosdep-install.sh | bash -xe
178+
shell: bash
179+
180+
- name: Compile Packages
181+
run: |
182+
source /opt/ros/one/setup.bash
183+
set -x
184+
cd ~/ws/
185+
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
186+
shell: bash
187+
188+
- name: Test Packages
189+
run: |
190+
source /opt/ros/one/setup.bash
191+
set -x
192+
cd ~/ws/
193+
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
194+
catkin build --force-cmake --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
195+
catkin test --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
196+
catkin_test_results --verbose --all
197+
shell: bash

eus_qp/CMakeLists.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ catkin_package()
2020

2121
add_executable(euq_qp_test src/example.cpp)
2222
add_library(eus_qp SHARED src/qp_lib.cpp)
23-
add_rostest(test/test_contact_wrench_opt.test)
24-
add_rostest(test/test_model_predictive_control.test)
25-
add_rostest(test/test_cfr_cwc_calculation.test)
26-
add_rostest(optmotiongen/test/test-sample-inverse-kinematics.test)
27-
add_rostest(optmotiongen/test/test-sample-inverse-kinematics-statics.test)
28-
add_rostest(optmotiongen/test/test-samplerobot.test)
29-
add_rostest(optmotiongen/test/test-sample-torque-gradient.test)
30-
add_rostest(optmotiongen/test/test-load-euslisp-files.test)
23+
24+
if(CATKIN_ENABLE_TESTING)
25+
add_rostest(test/test_contact_wrench_opt.test)
26+
add_rostest(test/test_model_predictive_control.test)
27+
add_rostest(test/test_cfr_cwc_calculation.test)
28+
add_rostest(optmotiongen/test/test-sample-inverse-kinematics.test)
29+
add_rostest(optmotiongen/test/test-sample-inverse-kinematics-statics.test)
30+
add_rostest(optmotiongen/test/test-samplerobot.test)
31+
add_rostest(optmotiongen/test/test-sample-torque-gradient.test)
32+
add_rostest(optmotiongen/test/test-load-euslisp-files.test)
33+
endif()
3134

3235
install(DIRECTORY euslisp test
3336
USE_SOURCE_PERMISSIONS

eus_qpoases/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ExternalProject_Add(qpoases
99
GIT_REPOSITORY https://github.com/coin-or/qpOASES
1010
GIT_TAG releases/3.0.1
1111
TIMEOUT 30
12-
PATCH_COMMAND patch -s -p0 < ${PROJECT_SOURCE_DIR}/patch/UseShareLibrary.patch
12+
PATCH_COMMAND patch -s -p0 --forward < ${PROJECT_SOURCE_DIR}/patch/UseShareLibrary.patch || true # # If there is no --forward, the build process hangs because the patch command waits interactively for input on whether a file that has already been patched can be patched again. If there is no || true , the patch command returns non-zero status.
1313
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
1414
BUILD_COMMAND make -j
1515
BUILD_IN_SOURCE 1
@@ -36,7 +36,9 @@ set_target_properties(eus_qpoases PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_
3636
add_dependencies(eus_qpoases qpoases)
3737
target_link_libraries(eus_qpoases qpOASES)
3838

39-
add_rostest(test/eus_qpoases.test)
39+
if(CATKIN_ENABLE_TESTING)
40+
add_rostest(test/eus_qpoases.test)
41+
endif()
4042

4143
install(DIRECTORY lib/
4244
USE_SOURCE_PERMISSIONS

eus_qpoases/src/eus_qpoases.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ extern "C" {
272272
double* state_min_vector, double* state_max_vector,
273273
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
274274
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
275-
solve_qpoases_qp_common(ret,
275+
return solve_qpoases_qp_common(ret,
276276
eval_weight_matrix, eval_coeff_vector,
277277
state_min_vector, state_max_vector,
278278
inequality_matrix, inequality_min_vector, inequality_max_vector,
@@ -284,7 +284,7 @@ extern "C" {
284284
double* state_min_vector, double* state_max_vector,
285285
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
286286
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
287-
solve_qpoases_qp_common(ret,
287+
return solve_qpoases_qp_common(ret,
288288
NULL, eval_coeff_vector,
289289
state_min_vector, state_max_vector,
290290
inequality_matrix, inequality_min_vector, inequality_max_vector,
@@ -296,7 +296,7 @@ extern "C" {
296296
double* state_min_vector, double* state_max_vector,
297297
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
298298
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
299-
solve_qpoases_qp_with_hotstart_common(ret,
299+
return solve_qpoases_qp_with_hotstart_common(ret,
300300
eval_weight_matrix, eval_coeff_vector,
301301
state_min_vector, state_max_vector,
302302
inequality_matrix, inequality_min_vector, inequality_max_vector,
@@ -308,7 +308,7 @@ extern "C" {
308308
double* state_min_vector, double* state_max_vector,
309309
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
310310
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
311-
solve_qpoases_qp_with_hotstart_common(ret,
311+
return solve_qpoases_qp_with_hotstart_common(ret,
312312
NULL, eval_coeff_vector,
313313
state_min_vector, state_max_vector,
314314
inequality_matrix, inequality_min_vector, inequality_max_vector,
@@ -320,7 +320,7 @@ extern "C" {
320320
double* state_min_vector, double* state_max_vector,
321321
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
322322
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
323-
solve_qpoases_sqp_with_hotstart_common(ret,
323+
return solve_qpoases_sqp_with_hotstart_common(ret,
324324
eval_weight_matrix, eval_coeff_vector,
325325
state_min_vector, state_max_vector,
326326
inequality_matrix, inequality_min_vector, inequality_max_vector,
@@ -332,7 +332,7 @@ extern "C" {
332332
double* state_min_vector, double* state_max_vector,
333333
double* inequality_matrix, double* inequality_min_vector, double* inequality_max_vector,
334334
int state_len, int inequality_len, PrintLevel print_level, double* ret_status) {
335-
solve_qpoases_sqp_with_hotstart_common(ret,
335+
return solve_qpoases_sqp_with_hotstart_common(ret,
336336
NULL, eval_coeff_vector,
337337
state_min_vector, state_max_vector,
338338
inequality_matrix, inequality_min_vector, inequality_max_vector,

eus_teleop/package.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<package format="2">
2+
<package format="3">
33
<name>eus_teleop</name>
44
<version>0.1.18</version>
55
<description>The eus_teleop package</description>
@@ -14,22 +14,22 @@
1414
<build_depend>std_msgs</build_depend>
1515

1616
<exec_depend>actionlib_msgs</exec_depend>
17-
<exec_depend>baxter_core_msgs</exec_depend>
18-
<exec_depend>baxtereus</exec_depend>
19-
<exec_depend>influxdb_store</exec_depend>
17+
<exec_depend condition="$ROS_DISTRO != one">baxter_core_msgs</exec_depend>
18+
<exec_depend condition="$ROS_DISTRO != one">baxtereus</exec_depend>
19+
<exec_depend condition="$ROS_DISTRO != one">influxdb_store</exec_depend>
2020
<exec_depend>jsk_interactive_marker</exec_depend>
2121
<exec_depend>jsk_topic_tools</exec_depend>
2222
<exec_depend>libuvc_camera</exec_depend>
2323
<exec_depend>message_runtime</exec_depend>
2424
<exec_depend>pr2eus</exec_depend>
2525
<exec_depend>roseus</exec_depend>
2626
<exec_depend>sensor_msgs</exec_depend>
27-
<exec_depend>softhand_ros</exec_depend>
27+
<exec_depend condition="$ROS_DISTRO != one">softhand_ros</exec_depend>
2828
<exec_depend>std_msgs</exec_depend>
2929
<exec_depend>topic_tools</exec_depend>
3030
<exec_depend>video_stream_opencv</exec_depend>
31-
<exec_depend>vive_ros</exec_depend>
32-
<exec_depend>pr2_moveit_config</exec_depend>
31+
<exec_depend condition="$ROS_DISTRO != one">vive_ros</exec_depend>
32+
<exec_depend condition="$ROS_DISTRO != one">pr2_moveit_config</exec_depend>
3333

3434
<export>
3535
</export>

jsk_footstep_planner/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,6 @@ install(TARGETS jsk_footstep_planner sample_astar sample_simple_graph
106106
install(DIRECTORY include/${PROJECT_NAME}/
107107
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
108108

109-
add_rostest(test/test_footstep_planning_eus_client.test)
109+
if(CATKIN_ENABLE_TESTING)
110+
add_rostest(test/test_footstep_planning_eus_client.test)
111+
endif()

jsk_footstep_planner/include/jsk_footstep_planner/footstep_state.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
#include <jsk_footstep_msgs/Footstep.h>
4141

42+
#include <pcl/common/transforms.h>
4243
#include <pcl/kdtree/kdtree_flann.h>
4344
#include <pcl/filters/crop_box.h>
4445
#include <pcl/sample_consensus/method_types.h>

jsk_footstep_planner/include/jsk_footstep_planner/grid_path_planner.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <jsk_footstep_planner/CollisionBoundingBoxInfo.h>
1717

1818
// pcl
19+
#include <pcl/common/common.h>
1920
#include <pcl/kdtree/kdtree_flann.h>
2021

2122
// grid path planning

jsk_footstep_planner/include/jsk_footstep_planner/pointcloud_model_generator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#ifndef JSK_FOOTSTEP_PLANNER_POINTCLOUD_MODEL_GENERATOR_H_
3838
#define JSK_FOOTSTEP_PLANNER_POINTCLOUD_MODEL_GENERATOR_H_
3939

40+
#include <boost/shared_ptr.hpp>
4041
#include <pcl/point_types.h>
4142
#include <pcl/point_cloud.h>
4243

0 commit comments

Comments
 (0)