Skip to content

Commit

Permalink
Merge pull request #127 from sunava/robocup-dev-merge
Browse files Browse the repository at this point in the history
Robocup dev merge
  • Loading branch information
sunava authored Nov 22, 2024
2 parents 09b634d + 56043f1 commit 6f90f9b
Show file tree
Hide file tree
Showing 65 changed files with 5,628 additions and 587 deletions.
1 change: 1 addition & 0 deletions .github/workflows/new-pycram-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
pip3 install --upgrade pip --root-user-action=ignore
cd /opt/ros/overlay_ws/src/pycram
pip3 install -r requirements.txt
sudo apt-get install -y libpq-dev
pip3 install -r requirements-resolver.txt
- name: Install pytest & pyjpt
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/notebook-test-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Test Jupyter Notebook Examples

on:
push:
branches:
- dev
- master
pull_request:
branches:
- master
- dev

# ----------------------------------------------------------------------------------------------------------------------

defaults:
run:
shell: bash
working-directory: .

jobs:
test-and-build:
name: Test Jupyter Notebooks
runs-on: ubuntu-20.04
container:
image: "pycram/pycram:dev"

steps:

- name: Checkout PyCRAM
uses: actions/checkout@v3
with:
path: "ros/src/pycram"
repository: ${{ github.repository }}
ref: ${{ github.ref }}
submodules: "recursive"

# For debugging
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: Update PyCRAM source files
run: |
rm -rf /opt/ros/overlay_ws/src/pycram/*
cd /opt/ros/overlay_ws/src/pycram
rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml
cp -r /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/ros/src/pycram /opt/ros/overlay_ws/src
# ----------------------------------------------------------------------------------------------------------------

- name: Install python dependencies
run: |
pip3 install --upgrade pip --root-user-action=ignore
cd /opt/ros/overlay_ws/src/pycram
pip3 install -r requirements.txt
sudo apt-get install -y libpq-dev
pip3 install -r requirements-resolver.txt
# ----------------------------------------------------------------------------------------------------------------

- name: Install Jupytext & Jupyter notebook
run: |
pip3 install jupytext treon
# ----------------------------------------------------------------------------------------------------------------
- name: Convert Notebooks
run: |
cd /opt/ros/overlay_ws/src/pycram/examples
rm -rf tmp
mkdir tmp
jupytext --to notebook *.md
mv *.ipynb tmp && cd tmp
- name: Source and start ROS
run: |
source /opt/ros/overlay_ws/devel/setup.bash
roslaunch pycram ik_and_description.launch &
- name: Run tests
run: |
source /opt/ros/overlay_ws/devel/setup.bash
roscd pycram/examples/tmp
treon --thread 1 -v --exclude=migrate_neems.ipynb
4 changes: 2 additions & 2 deletions demos/pycram_ur5_demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pycram.worlds.bullet_world import BulletWorld
from pycram.datastructures.world import Object
from pycram.datastructures.pose import Pose
from pycram.ros_utils.force_torque_sensor import ForceTorqueSensor
from pycram.ros_utils.force_torque_sensor import ForceTorqueSensorSimulated
from pycram.ros_utils.joint_state_publisher import JointStatePublisher
from pycram.ros_utils.tf_broadcaster import TFBroadcaster

Expand Down Expand Up @@ -42,6 +42,6 @@

tf_broadcaster = TFBroadcaster("projection", "odom", 1.0)
jsp = JointStatePublisher()
fts = ForceTorqueSensor("ee_fixed_joint")
fts = ForceTorqueSensorSimulated("ee_fixed_joint")

world.simulate(60)
7 changes: 7 additions & 0 deletions demos/util-scripts/save-urdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from urdf_parser_py.urdf import URDF

kitchen = URDF.from_parameter_server('iai_kitchen')
print (kitchen)
f = open("../../resources/suturo_lab_1.urdf", "w")
f.write(kitchen.to_xml_string())

Binary file added doc/images/algebraic_costmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/gaussian_costmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/occupancy_costmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/semantic_costmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/visibility_costmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ parts:
- file: new_robot.rst
- file: notebooks.rst
- file: designators.rst
- file: costmap.rst

- caption: Trouble Shooting
chapters:
Expand Down
Loading

0 comments on commit 6f90f9b

Please sign in to comment.