-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from Tigul/ci
Ci
- Loading branch information
Showing
15 changed files
with
167 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: CI standalone | ||
defaults: | ||
run: | ||
shell: bash -ieo pipefail {0} | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
jobs: | ||
Build_and_run_Tests: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout pycram | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/pycram' | ||
repository: ${{github.repository}} | ||
ref: ${{github.ref}} | ||
submodules: recursive | ||
|
||
- name: Checkout iai_maps | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/iai_maps' | ||
repository: code-iai/iai_maps | ||
ref: master | ||
- name: Checkout iai_robots | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/iai_robots' | ||
repository: code-iai/iai_robots | ||
ref: master | ||
- name: Checkout pr2_common | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/pr2_common' | ||
repository: PR2/pr2_common | ||
ref: master | ||
- name: Checkout kdl_ik_service | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/kdl_ik_service' | ||
repository: cram2/kdl_ik_service | ||
ref: master | ||
- name: Checkout pr2_kinematics | ||
uses: actions/checkout@v3 | ||
with: | ||
path: 'ros_ws/src/pr2_kinematics' | ||
repository: PR2/pr2_kinematics | ||
ref: kinetic-devel | ||
- name: install ros and deps | ||
uses: betwo/github-setup-catkin@master | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
with: | ||
# Version range or exact version of ROS version to use, using SemVer's version range syntax. | ||
ros-version: noetic | ||
build-tool: 'catkin_tools' | ||
# Root directory of the catkin workspace | ||
workspace: $GITHUB_WORKSPACE/ros_ws | ||
- name: build and source workspace | ||
run: | | ||
cd ros_ws | ||
catkin_make | ||
echo 'export ROS_HOSTNAME=localhost' >> ~/.bashrc | ||
echo 'source $GITHUB_WORKSPACE/ros_ws/devel/setup.bash' >> ~/.bashrc | ||
- name: Install requirements | ||
run: | | ||
cd $GITHUB_WORKSPACE/ros_ws/src/pycram | ||
sudo pip3 install -r requirements.txt | ||
- name: upgrade numpy | ||
run: | | ||
sudo pip3 install --upgrade numpy | ||
- name: install additional requirements | ||
run: | | ||
sudo pip3 install pytest pyjpt mlflow | ||
- name: start roscore | ||
run: | | ||
roslaunch pycram ik_and_description.launch & | ||
- name: Run Tests | ||
run: | | ||
roscd pycram | ||
pytest -v test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import unittest | ||
|
||
import numpy as np | ||
import rospkg | ||
|
||
from pycram.bullet_world import BulletWorld, Object, fix_missing_inertial | ||
from pycram.pose import Pose | ||
from pycram.robot_descriptions import robot_description | ||
from pycram.process_module import ProcessModule | ||
from pycram.enums import ObjectType | ||
import os | ||
import tf | ||
|
||
|
||
class BulletWorldTestCase(unittest.TestCase): | ||
|
||
world: BulletWorld | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
cls.world = BulletWorld("DIRECT") | ||
cls.robot = Object(robot_description.name, ObjectType.ROBOT, robot_description.name + ".urdf") | ||
cls.kitchen = Object("kitchen", ObjectType.ENVIRONMENT, "kitchen.urdf") | ||
cls.milk = Object("milk", ObjectType.MILK, "milk.stl", pose=Pose([1.3, 1, 0.9])) | ||
cls.cereal = Object("cereal", ObjectType.BREAKFAST_CEREAL, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) | ||
ProcessModule.execution_delay = False | ||
|
||
def setUp(self): | ||
self.world.reset_bullet_world() | ||
|
||
# DO NOT WRITE TESTS HERE!!! | ||
# Test related to the BulletWorld should be written in test_bullet_world.py | ||
# Tests in here would not be properly executed in the CI | ||
|
||
def tearDown(self): | ||
self.world.reset_bullet_world() | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
cls.world.exit() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters