Skip to content

Commit

Permalink
wtf
Browse files Browse the repository at this point in the history
  • Loading branch information
Julislz committed Oct 25, 2024
2 parents cb98fca + a27749b commit 316b1fc
Show file tree
Hide file tree
Showing 200 changed files with 69,204 additions and 203 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/reusable-sphinx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ name: Build Sphinx documentation 📖
on:
push:
branches:
<<<<<<< HEAD
- dev
pull_request:
branches:
- master
- dev
=======
- MS2
>>>>>>> a27749b26775a067b9d2b550387c2c08c00dadfa

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

Expand Down Expand Up @@ -44,4 +48,4 @@ jobs:
working-directory: ./doc
run: |
sudo apt install pandoc
make html
make html
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var/
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
# Unit pp.py / coverage reports
htmlcov/
.tox/
.coverage
Expand Down
11 changes: 11 additions & 0 deletions demos/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import builtins

try:
builtins.profile # type: ignore
except AttributeError:
# No line profiler, provide a pass-through version
def profile(func):
return func


builtins.profile = profile # type: ignore
11 changes: 10 additions & 1 deletion demos/pycram_bullet_world_demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@
from pycram.world_concepts.world_object import Object
from pycram.datastructures.dataclasses import Color

<<<<<<< HEAD
extension = ObjectDescription.get_file_extension()
=======
from pycram.ros.viz_marker_publisher import VizMarkerPublisher

world = BulletWorld("DIRECT")
v = VizMarkerPublisher()
robot = Object("hsrb", ObjectType.ROBOT, "hsrb.urdf", pose=Pose([1, 2, 0]))
apartment = Object("apartment", ObjectType.ENVIRONMENT, "apartment.urdf")
>>>>>>> a27749b26775a067b9d2b550387c2c08c00dadfa

world = BulletWorld()
robot = Object("pr2", ObjectType.ROBOT, f"pr2{extension}", pose=Pose([1, 2, 0]))
Expand Down Expand Up @@ -43,7 +52,7 @@ def move_and_detect(obj_type):


with simulated_robot:
ParkArmsAction([Arms.BOTH]).resolve().perform()
ParkArmsAction([Arms.LEFT]).resolve().perform()

MoveTorsoAction([0.25]).resolve().perform()

Expand Down
31 changes: 31 additions & 0 deletions demos/pycram_bullet_world_demo/hsrbtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import pycram.external_interfaces.giskard_new as giskardpy
from pycram.designators.action_designator import *
from pycram.designators.location_designator import *
from pycram.designators.object_designator import *
from pycram.external_interfaces.navigate import PoseNavigator
from pycram.pose import Pose
from pycram.bullet_world import BulletWorld, Object
from pycram.process_module import simulated_robot, with_simulated_robot
from pycram.enums import ObjectType
from pycram.ros.robot_state_updater import RobotStateUpdater, KitchenStateUpdater

from pycram.ros.viz_marker_publisher import VizMarkerPublisher
from pycram.utilities.robocup_utils import TextToSpeechPublisher, ImageSwitchPublisher, StartSignalWaiter

world = BulletWorld()
v = VizMarkerPublisher()
kitchen = Object("kitchen", ObjectType.ENVIRONMENT, "suturo_lab_version_15.urdf")
kitchen_desig = ObjectDesignatorDescription(names=["kitchen"])

talk = TextToSpeechPublisher()
img_swap = ImageSwitchPublisher()
start_signal_waiter = StartSignalWaiter()
move = PoseNavigator()

robot = Object("hsrb", "robot", "../../resources/" + "hsrb" + ".urdf", pose=Pose([1, 1, 0]))
robot.set_color([0.5, 0.5, 0.9, 1])
robot_desig = ObjectDesignatorDescription(names=["hsrb"])
RobotStateUpdater("/tf", "/hsrb/robot_state/joint_states")
KitchenStateUpdater("/tf", "/iai_kitchen/joint_states")

giskardpy.init_giskard_interface()
24 changes: 24 additions & 0 deletions demos/pycram_clean_the_table_demo/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Start the bringup
roslaunch suturo_bringup envi_bringup

# Start giskard
roslaunch giskardpy giskardpy_hsr_real_vel.launch

# Start robokudo
robokudo_venv
rosrun robokudo main.py _ae=clean_table _ros_pkg=milestone1

# It is also possible to start a specific roslaunch, to launch everything
roslaunch pycram clean_the_table.launch

# Start the demo file clean_table_demo_ms3.py

# After demo don't forget to restart at least giskard before relaunching the demo!


# In case where not all objects should be perceived, picked up and placed:
change values in wished_sorted_obj_list = ["Metalplate", "Metalbowl", "Metalmug", "Fork", "Spoon"]
you find this value at the beginning of the demo file

# When opening the dishwasher fails because of wrist_flex_joint or arm_flex_joint:
change goal_state_half_open in OpenDishwasherAction(handle_name, door_name, goal_state_half_open = 0.6, goal_state_full_open = 1.4, ["left"]).resolve().perform()
Loading

0 comments on commit 316b1fc

Please sign in to comment.