Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract world #133

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
4c950bc
[RemovingPybulletFromObjectClass] removed all usages of pybullet from…
AbdelrhmanBassiouny Nov 29, 2023
1953249
[RefactoringObjectClass] Now object class is independent of pybullet,…
AbdelrhmanBassiouny Nov 30, 2023
40d2d47
[RefactoringObjectClass] Now object class is independent of pybullet,…
AbdelrhmanBassiouny Nov 30, 2023
3af92d4
[WorldAbstractClass] InProgress , currently in add_constraint method
AbdelrhmanBassiouny Nov 30, 2023
bbb1800
[WorldAbstractClass] InProgress , refactoring transform_pose, _calcul…
AbdelrhmanBassiouny Dec 5, 2023
a5ae78b
[WorldAbstractClass] InProgress , currently in _set_attached_objects …
AbdelrhmanBassiouny Dec 6, 2023
5188eed
[WorldAbstractClass] InProgress , currently in refactoring attachments.
AbdelrhmanBassiouny Dec 7, 2023
3b365a8
[WorldAbstractClass] Updated local transformer class to not depend on…
AbdelrhmanBassiouny Dec 8, 2023
bac3a4b
[RefactoringAttachments] Improved attachment class to handle bidirect…
AbdelrhmanBassiouny Dec 9, 2023
5b61daa
[RefactoringAttachments] Improved attachment class, needs to better i…
AbdelrhmanBassiouny Dec 9, 2023
7fb3524
[AbstractWorld] Added a WorldState dataclass, Implemented saving and …
AbdelrhmanBassiouny Dec 10, 2023
0f1133b
[AbstractWorld] Finished defining AbstractWorld, and correcting all c…
AbdelrhmanBassiouny Dec 11, 2023
2d834a4
[AbstractWorld] Completed world.py refactoring, tests are passing exc…
AbdelrhmanBassiouny Dec 11, 2023
534390d
[AbstractWorld] some cleaning up.
AbdelrhmanBassiouny Dec 11, 2023
e2e2f12
[AbstractWorld] Moved BulletWorld and GUI classes to bullet_world.py,…
AbdelrhmanBassiouny Dec 11, 2023
f05ef64
[WorldAbstractClass] Tests are running after using object.tf_frame in…
AbdelrhmanBassiouny Dec 12, 2023
a81c489
[WorldAbstractClass] Added Color and AxisAlignedBoundingBox datalcass…
AbdelrhmanBassiouny Dec 12, 2023
278a7fe
[WorldAbstractClass] Some cleaning up and refactoring of method names.
AbdelrhmanBassiouny Dec 13, 2023
205c9f2
[ClassForLinks] Created Link class.
AbdelrhmanBassiouny Dec 14, 2023
17ed78f
[WorldAbstractClass] Created links dictionary inside Object class to …
AbdelrhmanBassiouny Dec 15, 2023
0e70fe2
[WorldAbstractClass] removed all link related functionality from Obje…
AbdelrhmanBassiouny Dec 15, 2023
417c176
[AbstractWorld]
AbdelrhmanBassiouny Dec 22, 2023
fae2d8f
[AbstractWorld]
AbdelrhmanBassiouny Dec 24, 2023
2099bd7
[AbstractWorld]
AbdelrhmanBassiouny Dec 28, 2023
38516ff
[AbstractWorld]
AbdelrhmanBassiouny Jan 1, 2024
9a9d1a6
[AbstractWorld]
AbdelrhmanBassiouny Jan 1, 2024
34fd070
[AbstractWorld]
AbdelrhmanBassiouny Jan 18, 2024
e296537
[WorldAbstractClass] Reseting the world now also has the option to re…
AbdelrhmanBassiouny Jan 18, 2024
62c5309
[WorldAbstractClass] World reasoning is refactored to depend on abstr…
AbdelrhmanBassiouny Jan 19, 2024
371d72c
[AbstractWorld]
AbdelrhmanBassiouny Jan 21, 2024
624bb8c
[WorldAbstractClass] world_reasoning.py is not a class anymore.
AbdelrhmanBassiouny Jan 23, 2024
8583fd1
[WorldAbstractClass] (in progress) implementing abstract shape creati…
AbdelrhmanBassiouny Jan 23, 2024
8c32506
Merge branch 'dev' of https://github.com/cram2/pycram into abstract_w…
AbdelrhmanBassiouny Jan 24, 2024
ed33735
Merge branch 'dev' of github.com:cram2/pycram into abstract_world
AbdelrhmanBassiouny Jan 24, 2024
49a7026
Merge branch 'dev' of github.com:cram2/pycram into abstract_world (fi…
AbdelrhmanBassiouny Jan 24, 2024
3916ded
[Abstract World] (check TODOs) Costmaps now is independent of pybull…
AbdelrhmanBassiouny Jan 24, 2024
6c4e42c
[Abstract World] Corrected setting position of object to allow lists.
AbdelrhmanBassiouny Jan 25, 2024
11fbdc4
[Abstract World] Corrected setting position of object to allow lists …
AbdelrhmanBassiouny Jan 25, 2024
f139b2a
[Abstract World] updated method names in bullet_world.ipynb
AbdelrhmanBassiouny Jan 25, 2024
c267c68
[Abstract World] applying code review edits, stopped at get_link_colo…
AbdelrhmanBassiouny Jan 25, 2024
1aaa11e
[Abstract World] documenting Object class and cleaning it.
AbdelrhmanBassiouny Jan 26, 2024
eace428
[Abstract World] Cleaned Object constructor, added more internal meth…
AbdelrhmanBassiouny Jan 30, 2024
2a8d4fa
[Abstract World] Documented internal functions.
AbdelrhmanBassiouny Jan 31, 2024
efdf22a
[Abstract World] Removed all mentions and dependencies of bullet worl…
AbdelrhmanBassiouny Jan 31, 2024
50adda9
[Abstract World] all change requests completed
AbdelrhmanBassiouny Feb 1, 2024
99c675f
[AbstractWorld]
AbdelrhmanBassiouny Feb 3, 2024
a8405b2
[AbstractWorld]
AbdelrhmanBassiouny Feb 9, 2024
85a6cb3
[Abstract World] Abstracted URDF dependency.
AbdelrhmanBassiouny Feb 9, 2024
d2b9f97
[AbstractWorld]
AbdelrhmanBassiouny Feb 13, 2024
0d80945
[Abstract World] Fixing tests (test_detect)
AbdelrhmanBassiouny Feb 13, 2024
17018f9
[Abstract World] Fixing tests (test_detect)
AbdelrhmanBassiouny Feb 13, 2024
3fa6880
[Abstract World] Tests are running.
AbdelrhmanBassiouny Feb 14, 2024
8433035
[Abstract World] Refactored File structure (Moved Classes to separate…
AbdelrhmanBassiouny Feb 14, 2024
bfc5134
[Abstract World] Added more tests for bullet world, Tests are running.
AbdelrhmanBassiouny Feb 15, 2024
b9f5d86
[Abstract World] Added more tests for bullet world, Tests are running.
AbdelrhmanBassiouny Feb 15, 2024
1458e03
[Abstract World] Added more tests for bullet world, Tests are running.
AbdelrhmanBassiouny Feb 15, 2024
c49ccc0
[Abstract World] Added more tests for bullet world, Tests are running.
AbdelrhmanBassiouny Feb 16, 2024
bba4c4f
[Abstract World] Added more tests for bullet world, Tests are running.
AbdelrhmanBassiouny Feb 16, 2024
9e39552
[Abstract World] Tried importing annotations from __future__ but Fail…
AbdelrhmanBassiouny Feb 20, 2024
8462338
[Abstract World] Solved cyclic imports problem.
AbdelrhmanBassiouny Feb 23, 2024
7b8afe6
[Abstract World] Resolved requested changes.
AbdelrhmanBassiouny Feb 23, 2024
c85cb91
[AbstractWorld]
AbdelrhmanBassiouny Feb 25, 2024
8b81353
[AbstractWorld]
AbdelrhmanBassiouny Feb 27, 2024
b4a384f
[Abstract World] solved cache search problem, tests are passing.
AbdelrhmanBassiouny Feb 27, 2024
953f312
[Abstract World] Defualted description type to URDF as it as it is cu…
AbdelrhmanBassiouny Feb 27, 2024
b6a512e
[AbstractWorld]
AbdelrhmanBassiouny Feb 27, 2024
44b7d71
[AbstractWorld] restructured folders and files.
AbdelrhmanBassiouny Mar 19, 2024
4155d6a
[AbstractWorld] Fixed viz_marker_publisher.py to use VisualShape for …
AbdelrhmanBassiouny Mar 21, 2024
5a91845
[AbstractWorld] Add dae to possible mesh types.
AbdelrhmanBassiouny Mar 22, 2024
0f54c8b
[AbstractWorld] added dae to possible meshes and updated cache file w…
AbdelrhmanBassiouny Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions demos/pycram_bullet_world_demo/demo.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
from pycram.worlds.bullet_world import BulletWorld
from pycram.designators.action_designator import *
from pycram.designators.location_designator import *
from pycram.designators.object_designator import *
from pycram.pose import Pose
from pycram.bullet_world import BulletWorld, Object
from pycram.datastructures.enums import ObjectType
from pycram.datastructures.pose import Pose
from pycram.process_module import simulated_robot, with_simulated_robot
from pycram.enums import ObjectType
from pycram.object_descriptors.urdf import ObjectDescription
from pycram.world_concepts.world_object import Object
from pycram.datastructures.dataclasses import Color

world = BulletWorld()
robot = Object("pr2", ObjectType.ROBOT, "pr2.urdf", pose=Pose([1, 2, 0]))
apartment = Object("apartment", ObjectType.ENVIRONMENT, "apartment.urdf")
extension = ObjectDescription.get_file_extension()

milk = Object("milk", ObjectType.MILK, "milk.stl", pose=Pose([2.5, 2, 1.02]), color=[1, 0, 0, 1])
cereal = Object("cereal", ObjectType.BREAKFAST_CEREAL, "breakfast_cereal.stl", pose=Pose([2.5, 2.3, 1.05]), color=[0, 1, 0, 1])
spoon = Object("spoon", ObjectType.SPOON, "spoon.stl", pose=Pose([2.4, 2.2, 0.85]), color=[0, 0, 1, 1])
bowl = Object("bowl", ObjectType.BOWL, "bowl.stl", pose=Pose([2.5, 2.2, 1.02]), color=[1, 1, 0, 1])
world = BulletWorld()
robot = Object("pr2", ObjectType.ROBOT, f"pr2{extension}", pose=Pose([1, 2, 0]))
apartment = Object("apartment", ObjectType.ENVIRONMENT, f"apartment{extension}")

milk = Object("milk", ObjectType.MILK, "milk.stl", pose=Pose([2.5, 2, 1.02]),
color=Color(1, 0, 0, 1))
cereal = Object("cereal", ObjectType.BREAKFAST_CEREAL, "breakfast_cereal.stl",
pose=Pose([2.5, 2.3, 1.05]), color=Color(0, 1, 0, 1))
spoon = Object("spoon", ObjectType.SPOON, "spoon.stl", pose=Pose([2.4, 2.2, 0.85]),
color=Color(0, 0, 1, 1))
bowl = Object("bowl", ObjectType.BOWL, "bowl.stl", pose=Pose([2.5, 2.2, 1.02]),
color=Color(1, 1, 0, 1))
apartment.attach(spoon, 'cabinet10_drawer_top')

pick_pose = Pose([2.7, 2.15, 1])
Expand Down Expand Up @@ -52,7 +61,8 @@ def move_and_detect(obj_type):

# Finding and navigating to the drawer holding the spoon
handle_desig = ObjectPart(names=["handle_cab10_t"], part_of=apartment_desig.resolve())
drawer_open_loc = AccessingLocation(handle_desig=handle_desig.resolve(), robot_desig=robot_desig.resolve()).resolve()
drawer_open_loc = AccessingLocation(handle_desig=handle_desig.resolve(),
robot_desig=robot_desig.resolve()).resolve()

NavigateAction([drawer_open_loc.pose]).resolve().perform()

Expand Down Expand Up @@ -88,4 +98,3 @@ def move_and_detect(obj_type):
PlaceAction(spoon_desig, [spoon_target_pose], [pickup_arm]).resolve().perform()

ParkArmsAction([Arms.BOTH]).resolve().perform()

8 changes: 4 additions & 4 deletions demos/pycram_ur5_demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from rospkg import RosPack
import pybullet as pb

from pycram import robot_description
from pycram.bullet_world import BulletWorld, Object
from pycram.pose import Pose
from pycram.worlds.bullet_world import BulletWorld
from pycram.world import Object
from pycram.datastructures.pose import Pose
from pycram.ros.force_torque_sensor import ForceTorqueSensor
from pycram.ros.joint_state_publisher import JointStatePublisher
from pycram.ros.tf_broadcaster import TFBroadcaster
Expand Down Expand Up @@ -37,7 +37,7 @@
lab = Object("kitchen", "environment", kitchen_urdf_path)
robot = Object("ur", "robot", robot_urdf_path, pose=SPAWNING_POSES["robot"])
cereal = Object("cereal", "object", os.path.join(RESOURCE_DIR, "breakfast_cereal.stl"),
pose=SPAWNING_POSES["cereal"])
pose=SPAWNING_POSES["cereal"])
BulletWorld.robot = robot

tf_broadcaster = TFBroadcaster("projection", "odom", 1.0)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

# Example Thumbnail config
nbsphinx_thumbnails = {
'notebooks/bullet_world': os.path.abspath("notebooks/thumbnails/bullet_world.png"),
'notebooks/world': os.path.abspath("notebooks/thumbnails/bullet_world.png"),
'notebooks/minimal_task_tree': os.path.abspath("notebooks/thumbnails/tree.png"),
'notebooks/action_designator': os.path.abspath("notebooks/thumbnails/action_designator.png"),
'notebooks/motion_designator': os.path.abspath("notebooks/thumbnails/motion_designator.png"),
Expand Down
1 change: 0 additions & 1 deletion doc/source/notebooks/bullet_world.ipynb

This file was deleted.

Loading