Skip to content

Commit

Permalink
Merge branch 'master' into fix-failure-recovery-sample
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada authored Sep 29, 2023
2 parents 9309a40 + e238fe0 commit 6f3581f
Show file tree
Hide file tree
Showing 56 changed files with 1,115 additions and 67 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
on:
push:
branches:
- master
pull_request:

env:
DISPLAY: ':0.0'

jobs:
ros:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- ROS_DISTRO: indigo
CONTAINER: jskrobotics/ros-ubuntu:14.04
NOT_TEST_INSTALL: true
- ROS_DISTRO: kinetic
CONTAINER: jskrobotics/ros-ubuntu:16.04
- ROS_DISTRO: melodic
CONTAINER: jskrobotics/ros-ubuntu:18.04
- ROS_DISTRO: noetic
CONTAINER: jskrobotics/ros-ubuntu:20.04

container: ${{ matrix.CONTAINER }}
steps:
- name: Install latest git ( use sudo for ros-ubuntu )
run: |
[ -e /etc/apt/sources.list.d/ubuntu-esm-infra-$(lsb_release -cs).list ] && sudo rm /etc/apt/sources.list.d/ubuntu-esm-infra-$(lsb_release -cs).list ## fix Err https://esm.ubuntu.com trusty-infra-security/main amd64 Packages, gnutls_handshake() failed: Handshake failed
(apt-get update && apt-get install -y sudo) || echo "OK"
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get update
sudo -E add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
run: |
set -x
export USER=$(whoami)
sudo chown -R $USER $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE || echo "OK" # Show 'could not lock config file /github/home/.gitconfig: Permission denied', but it is ok
sudo mkdir -p /__w/
sudo chmod 777 -R /__w/
sudo chown -R $USER $HOME
# sudo mkdir -p /home/runner/work/_temp/_github_workflow/
# sudo chown -R $USER $HOME /home/runner/work/_temp/_github_workflow/
# ls -al /home/runner/work/_temp/_github_workflow/
- name: Chcekout
uses: actions/[email protected]

- name: Start X server
run: |
if [[ "${{ matrix.CONTAINER }}" =~ "jskrobotics/ros-ubuntu:14.04" ]]; then exit 0; fi
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections || echo "failing on ros-ubuntu is OK" # set non interactive tzdata https://stackoverflow.com/questions/8671308/non-interactive-method-for-dpkg-reconfigure-tzdata
sudo apt-get -y -qq install mesa-utils x11-xserver-utils xserver-xorg-video-dummy wget
export DISPLAY=:0
wget https://raw.githubusercontent.com/jsk-ros-pkg/jsk_travis/master/dummy.xorg.conf -O /tmp/dummy.xorg.conf
sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /tmp/xorg.log -config /tmp/dummy.xorg.conf $DISPLAY &
sleep 3 # wait x server up
export QT_X11_NO_MITSHM=1 # http://wiki.ros.org/docker/Tutorials/GUI
xhost +local:root
shell: bash

- name: Run jsk_travis
uses: jsk-ros-pkg/jsk_travis@master
with:
ROS_PARALLEL_JOBS : "-j8"
CATKIN_PARALLEL_JOBS : "-p8"
ROS_PARALLEL_TEST_JOBS : "-j1"
CATKIN_PARALLEL_TEST_JOBS : "-p1"
ROS_DISTRO : ${{ matrix.ROS_DISTRO }}
USE_DEB : ${{ matrix.USE_DEB }}
NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }}
TEST_PKGS : ${{ matrix.TEST_PKGS }}
EXTRA_DEB : ${{ matrix.EXTRA_DEB }}
18 changes: 18 additions & 0 deletions .github/workflows/python2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# generated by `./generate_action_config.py noetic`
# jsk_travis
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
name: check_python2

container: ubuntu:20.04

steps:
- name: Chcekout
uses: actions/checkout@v2
- name: Check Python2
run: |
apt update -q && apt install -y -q python2
python2 -m compileall .
22 changes: 22 additions & 0 deletions .github/workflows/python3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# generated by `./generate_action_config.py noetic`
# jsk_travis
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
name: check_python3

container: ubuntu:20.04

steps:
- name: Install latest git to download .git directory in actions/checkout@v2 ( use sudo for ros-ubuntu )
run: apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Chcekout
uses: actions/checkout@v2
- name: Check Python3
run: |
apt update -q && apt install -y -q python3 git 2to3
bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . > /dev/null; echo Exitting with \$ret; exit \$ret"
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
sudo: true
dist: bionic
language: generic
notifications:
email:
on_success: always
on_failure: always
slack: jsk-robotics:Av7tc8wj3IWkLYvlTzHE7x2g
addons:
apt:
packages:
- 2to3
services:
- docker
env:
global:
- USE_DOCKER=true
matrix:
- CHECK_PYTHON3_COMPILE=true
- CHECK_PYTHON2_COMPILE=true
- ROS_DISTRO=hydro USE_DEB=false
- ROS_DISTRO=indigo USE_DEB=true
- ROS_DISTRO=jade USE_DEB=true
Expand All @@ -21,4 +29,7 @@ matrix:
- env: ROS_DISTRO=hydro USE_DEB=false
- env: ROS_DISTRO=indigo USE_DEB=true
- env: ROS_DISTRO=jade USE_DEB=true
script: source .travis/travis.sh
script:
- if [ "${CHECK_PYTHON2_COMPILE}" == "true" ]; then python2 -m compileall .; exit $?; fi
- if [ "${CHECK_PYTHON3_COMPILE}" == "true" ]; then bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . :^.travis > /dev/null; echo Exitting with \$ret; exit \$ret"; exit $?; fi
- source .travis/travis.sh
10 changes: 10 additions & 0 deletions pddl/pddl_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ if(CATKIN_ENABLE_TESTING)
add_rostest(test/test-simple-failure-torelant.test)
add_rostest(test/test-sample-pddl.test)
add_rostest(test/test-durative-two-robot-tablecloth.test)
add_rostest(test/2008_okada_ias.test)
add_rostest(test/2011_kakiuchi.test)
add_rostest(test/2011_saito_knock_door.test)
add_rostest(test/2011_saito_simple.test)
add_rostest(test/2013_fridge_demo.test)
## add_rostest(test/2016_kamada_durative.test) ## this requries lpg_planner, which is needs source install
add_rostest(test/demos_hanoi.test)
add_rostest(test/search_object.test)
add_rostest(test/simple_failure_torelant.test)
add_rostest(test/simple_metric.test)
endif()
5 changes: 4 additions & 1 deletion pddl/pddl_planner/demos/2008_okada_ias/demo_pour_tea.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<launch>
<arg name="display_graph" default="true" />
<arg name="launch_prefix" default="" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="pddl_planner" name="demo_pour_tea"
launch-prefix="$(arg launch_prefix)"
type="solve-pour-tea.l" >
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
7 changes: 4 additions & 3 deletions pddl/pddl_planner/demos/2008_okada_ias/solve-pour-tea.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env roseus

(setq *exit-on-end* (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7)))

(load "package://pddl_planner/src/pddl-result-graph.l")
(load "package://pddl_planner/src/eus-pddl-client.l")

Expand Down Expand Up @@ -122,7 +124,6 @@
(send gr :write-to-pdf "okada_ias.pdf")

(when (ros::get-param "~display_graph" "true")
(piped-fork "gnome-open okada_ias.pdf"))
(piped-fork "xdg-open okada_ias.pdf"))

(when (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7))
(ros::exit))
(if *exit-on-end* (ros::exit))
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<launch>
<arg name="display_graph" default="true" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="pddl_planner" name="demo_pour_tea"
type="solve-cleanup-table.l" >
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
(send *graph* :write-to-pdf "kakiuchi_robomec.pdf")

(when (ros::get-param "~display_graph")
(piped-fork "gnome-open kakiuchi_robomec.pdf"))
(piped-fork "xdg-open kakiuchi_robomec.pdf"))

(when (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7))
(ros::exit))
5 changes: 4 additions & 1 deletion pddl/pddl_planner/demos/2011_saito/demo-knock-door.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<launch>
<arg name="display_graph" default="true" />
<arg name="launch_prefix" default="" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="smach_viewer" name="smach_viewer" type="smach_viewer.py"/>
<node pkg="pddl_planner" name="demo_knock_door"
launch-prefix="$(arg launch_prefix)"
type="solve-knock-door.l" output="screen">
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
3 changes: 2 additions & 1 deletion pddl/pddl_planner/demos/2011_saito/demo-simple-task.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<launch>
<arg name="display_graph" default="true" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="smach_viewer" name="smach_viewer" type="smach_viewer.py"/>
<node pkg="pddl_planner" name="demo_knock_door"
type="solve-simple-task.l" output="screen">
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<launch>
<arg name="display_graph" default="true" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="pddl_planner" name="demo_take_elevatpr"
type="solve-taking-elevator.l" >
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
11 changes: 6 additions & 5 deletions pddl/pddl_planner/demos/2011_saito/solve-knock-door.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env roseus

(setq *exit-on-end* (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7)))

(load "package://pddl_planner/src/pddl-result-graph.l")
(load "package://pddl_planner/src/eus-pddl-client.l")

Expand Down Expand Up @@ -184,9 +186,9 @@

(send *graph* :name (send *domain* :name))

;(send *graph* :write-to-pdf "knock_demo.pdf")
;(when (ros::get-param "~display_graph")
; (piped-fork "gnome-open knock_demo.pdf"))
(send *graph* :write-to-pdf "knock_demo.pdf")
(when (ros::get-param "~display_graph")
(piped-fork "xdg-open knock_demo.pdf"))

;; action definition
;; domain -> package
Expand Down Expand Up @@ -218,5 +220,4 @@
;; global data is not used (nil)
(exec-smach-with-spin (convert-smach *graph*) nil :hz 1.0)

(when (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7))
(ros::exit))
(if *exit-on-end* (ros::exit))
2 changes: 1 addition & 1 deletion pddl/pddl_planner/demos/2011_saito/solve-simple-task.l
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

(send *graph* :write-to-pdf "knock_demo.pdf")
(when (ros::get-param "~display_graph")
(piped-fork "gnome-open knock_demo.pdf"))
(piped-fork "xdg-open knock_demo.pdf"))

;; action definition
;; domain -> package
Expand Down
2 changes: 1 addition & 1 deletion pddl/pddl_planner/demos/2011_saito/solve-taking-elevator.l
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
(send *graph* :write-to-pdf "knock_demo.pdf")

(when (ros::get-param "~display_graph")
(piped-fork "gnome-open knock_demo.pdf")
(piped-fork "xdg-open knock_demo.pdf")

(when (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7))
(ros::exit))
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<launch>
<arg name="display_graph" default="true" />
<arg name="launch_prefix" default="" />
<include file="$(find pddl_planner)/launch/pddl_ffha.launch" />
<node pkg="pddl_planner" name="demo_bring_can"
launch-prefix="$(arg launch_prefix)"
type="solve-bring-can.l" >
<param name="display_graph" value="true" />
<param name="display_graph" value="$(arg display_graph)" />
</node>
<node pkg="smach_viewer" name="smach_viewer"
type="smach_viewer.py" />
Expand Down
8 changes: 5 additions & 3 deletions pddl/pddl_planner/demos/2013_fridge_demo/solve-bring-can.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env roseus

(setq *exit-on-end* (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7)))

(require :eus-pddl-client "package://pddl_planner/src/eus-pddl-client.l")
(require :pddl-result-graph "package://pddl_planner/src/pddl-result-graph.l")

Expand Down Expand Up @@ -151,7 +153,8 @@

(when (and (ros::has-param "~display_graph")
(ros::get-param "~display_graph"))
;;(piped-fork "gnome-open debug.pdf")

(piped-fork "xdg-open debug.pdf")
(load "package://roseus_smach/src/pddl2smach.l")
(load "package://roseus_smach/src/state-machine-ros.l")

Expand All @@ -161,5 +164,4 @@
(send *sm-inspect* :reset-state)
)

(when (string= "__log:=" (subseq (car (last lisp::*eustop-argument*)) 0 7))
(ros::exit))
(if *exit-on-end* (ros::exit))
6 changes: 6 additions & 0 deletions pddl/pddl_planner/demos/2016_kamada_durative/demo.launch
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<launch>
<arg name="display_graph" default="true" />
<node pkg="pddl_planner"
type="pddl.py"
name="pddl_planner"
Expand All @@ -8,4 +9,9 @@
<param name="pddl_search_option"
value="-n 3 -out result -restarts 8 -nobestfirst -search_steps 500 -i_choice 2" />
</node>
<node pkg="roseus" name="durative_action_demo"
type="roseus" output="screen"
args="$(find pddl_planner)/demos/2016_kamada_durative/demo.l (demo)" >
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
7 changes: 7 additions & 0 deletions pddl/pddl_planner/demos/2016_kamada_durative/example.launch
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<launch>
<arg name="display_graph" default="true" />
<arg name="roseus_command" default="'(progn (demo)(exit))'" />
<node pkg="pddl_planner"
type="pddl.py"
name="pddl_planner"
Expand All @@ -8,4 +10,9 @@
<param name="pddl_search_option"
value="-n 1 -out result -restarts 8 -nobestfirst -search_steps 500 -i_choice 2" />
</node>
<node pkg="roseus" name="durative_action_demo"
type="roseus" output="screen"
args="$(find pddl_planner)/demos/2016_kamada_durative/example.l $(arg roseus_command)" >
<param name="display_graph" value="$(arg display_graph)" />
</node>
</launch>
11 changes: 6 additions & 5 deletions pddl/pddl_planner/demos/2016_kamada_durative/tools.l
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,11 @@
(unix:system (format nil "dot ~A -Tpdf -o ~A" ".verbose.dot" ".verbose.pdf"))
(unix:system (format nil "dot ~A -Tpdf -o ~A" ".verbose_separated.dot" ".verbose_separated.pdf"))
(unix:system (format nil "dot ~A -Tpdf -o ~A" ".inter_robot_relationship.dot" ".inter_robot_relationship.pdf"))
(piped-fork "gnome-open .normal.pdf")
(piped-fork "gnome-open .normal_separated.pdf")
(piped-fork "gnome-open .verbose.pdf")
(piped-fork "gnome-open .verbose_separated.pdf")
(piped-fork "gnome-open .inter_robot_relationship.pdf")
(when (ros::get-param "~display_graph")
(piped-fork "xdg-open .normal.pdf")
(piped-fork "xdg-open .normal_separated.pdf")
(piped-fork "xdg-open .verbose.pdf")
(piped-fork "xdg-open .verbose_separated.pdf")
(piped-fork "xdg-open .inter_robot_relationship.pdf")
))
)
Loading

0 comments on commit 6f3581f

Please sign in to comment.