Skip to content

Commit

Permalink
0.1.4 Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed May 24, 2023
2 parents 6ee6b42 + 9567468 commit 1550f31
Show file tree
Hide file tree
Showing 143 changed files with 321,366 additions and 2,372 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/overworld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-18.04]
include:
- operating-system: ubuntu-18.04
distro: melodic
#- operating-system: ubuntu-18.04
# distro: melodic
- operating-system: ubuntu-20.04
distro: noetic
env:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/overworld_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-18.04]
include:
- operating-system: ubuntu-18.04
distro: melodic
#- operating-system: ubuntu-18.04
# distro: melodic
- operating-system: ubuntu-20.04
distro: noetic
env:
Expand Down
124 changes: 65 additions & 59 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,46 @@
- apt-get update -qq && apt-get install -y libcppunit-1.15-0 libcppunit-dev libtinyxml-dev git-all python3-rosdep python3-pip
- pip3 install requests --user

.install_bullet_template : &install_bullet
before_script:
- mkdir -p ~/dependencies && cd ~/dependencies
- git clone https://github.com/bulletphysics/bullet3.git
- cd bullet3
- mkdir build && mkdir install
- export BULLET_PATH=$(pwd)
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$BULLET_PATH/install -DBUILD_SHARED_LIBS=ON
- make install
- export BULLET_INSTALL_PATH=~/dependencies/bullet3/install
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BULLET_INSTALL_PATH/lib
.install_bullet_template : &install_bullet |
mkdir -p ~/dependencies && cd ~/dependencies
git clone https://github.com/bulletphysics/bullet3.git
cd bullet3
mkdir build && mkdir install
export BULLET_PATH=$(pwd)
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$BULLET_PATH/install -DBUILD_SHARED_LIBS=ON
make install
export BULLET_INSTALL_PATH=~/dependencies/bullet3/install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BULLET_INSTALL_PATH/lib

.create_ws_template : &create_ws
before_script:
- mkdir -p ~/ros_ws/src
- cd ~/ros_ws
- catkin_make -DCMAKE_BUILD_TYPE=Release
.create_ws_template : &create_ws |
mkdir -p ~/ros_ws/src
cd ~/ros_ws
catkin_make -DCMAKE_BUILD_TYPE=Release

.clone_modules_template : &clone_modules
before_script:
- cd ~/ros_ws/src
- mkdir overworld_modules && cd overworld_modules
- git clone https://github.com/sarthou/artrack_perception_module.git
- git clone https://github.com/sarthou/optitrack_perception_module.git
- git clone https://github.com/sarthou/pr2_gripper_perception_module.git
.clone_modules_template : &clone_modules |
cd ~/ros_ws/src
mkdir overworld_modules && cd overworld_modules
git clone https://github.com/sarthou/artrack_perception_module.git
git clone https://github.com/sarthou/optitrack_perception_module.git
git clone https://github.com/sarthou/pr2_gripper_perception_module.git

.clone_deps_melodic_template : &clone_deps_melodic
before_script:
- cd ~/ros_ws/src
- git clone https://github.com/RIS-WITH/optitrack_msgs.git
- git clone https://github.com/sarthou/ar_track_alvar.git
.clone_deps_melodic_template : &clone_deps_melodic |
cd ~/ros_ws/src
git clone https://github.com/RIS-WITH/optitrack_msgs.git
git clone https://github.com/sarthou/ar_track_alvar.git

.clone_deps_noetic_template : &clone_deps_noetic
before_script:
- cd ~/ros_ws/src
- git clone https://github.com/RIS-WITH/optitrack_msgs.git
- git clone -b noetic-devel https://github.com/sarthou/ar_track_alvar.git
.clone_deps_noetic_template : &clone_deps_noetic |
cd ~/ros_ws/src
git clone https://github.com/RIS-WITH/optitrack_msgs.git
git clone -b noetic-devel https://github.com/sarthou/ar_track_alvar.git

.build_script_template : &build_script_definition
script:
- cd ~/ros_ws/src
- cp -r /builds/$GITLAB_USER_LOGIN/overworld .
- git clone -b dev https://github.com/sarthou/ontologenius.git
- cd ..
- catkin_make -DCMAKE_BUILD_TYPE=Release
.build_script_template : &build_script_definition |
cd ~/ros_ws/src
cp -r /builds/$GITLAB_USER_LOGIN/overworld .
git clone -b dev https://github.com/sarthou/ontologenius.git
cd ..
catkin_make -DCMAKE_BUILD_TYPE=Release

stages:
- build
Expand All @@ -65,34 +59,46 @@ run-build-melodic:
image: ros:melodic-perception-bionic
stage: build
<<: *melodic_before_definition
<<: *install_bullet
<<: *create_ws
<<: *build_script_definition
script:
- *install_bullet
- *create_ws
- *build_script_definition

run-build-noetic:
image: ros:noetic-perception-focal
stage: build
<<: *noetic_before_definition
<<: *install_bullet
<<: *create_ws
<<: *build_script_definition
script:
- *install_bullet
- *create_ws
- *build_script_definition

run-build-modules-melodic:
image: ros:melodic-perception-bionic
stage: build
stage: build_modules
rules:
- if: '$CI_COMMIT_BRANCH == "dev"'
when: always
- when: never
<<: *melodic_before_definition
<<: *install_bullet
<<: *create_ws
<<: *clone_modules
<<: *clone_deps_melodic
<<: *build_script_definition
script:
- *install_bullet
- *create_ws
- *clone_modules
- *clone_deps_melodic
- *build_script_definition

run-build-modules-noetic:
image: ros:noetic-perception-focal
stage: build
stage: build_modules
rules:
- if: '$CI_COMMIT_BRANCH == "dev"'
when: always
- when: never
<<: *noetic_before_definition
<<: *install_bullet
<<: *create_ws
<<: *clone_modules
<<: *clone_deps_noetic
<<: *build_script_definition
script:
- *install_bullet
- *create_ws
- *clone_modules
- *clone_deps_noetic
- *build_script_definition
52 changes: 38 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if(DEFINED ENV{BULLET_INSTALL_PATH})
endif()

find_package(catkin REQUIRED COMPONENTS
ontologenius
roscpp
std_msgs
genmsg
message_generation
tf
tf2
tf2_ros
tf2_eigen
Expand All @@ -27,7 +27,8 @@ find_package(catkin REQUIRED COMPONENTS
cv_bridge
pluginlib
)
find_package (Eigen3 REQUIRED NO_MODULE)
find_package(ontologenius 0.2.12 REQUIRED)
find_package(Eigen3 REQUIRED NO_MODULE)
find_package(Threads REQUIRED)
find_package(CURL REQUIRED)
find_package(pluginlib REQUIRED)
Expand Down Expand Up @@ -67,6 +68,7 @@ add_message_files(
EntityPose.msg
EntitiesPoses.msg
AgentPose.msg
Pose.msg
)

add_service_files(
Expand Down Expand Up @@ -105,6 +107,7 @@ catkin_package(

include_directories(
include
${ontologenius_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
Expand All @@ -123,15 +126,30 @@ target_link_libraries(Bullet3 INTERFACE
${catkin_LIBRARIES}
Threads::Threads)

add_library(${PROJECT_NAME}_utility_lib STATIC
src/Utility/YamlReader.cpp
src/Utility/Ontology.cpp
src/Utility/RosFiles.cpp
src/Utility/Wavefront.cpp
)
target_link_libraries(${PROJECT_NAME}_utility_lib PUBLIC
${catkin_LIBRARIES}
${ontologenius_LIBRARIES})
set_target_properties(${PROJECT_NAME}_utility_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(${PROJECT_NAME}_bullet_lib STATIC
src/Bullet/PhysicsServers.cpp
src/Bullet/BulletClient.cpp
)
target_link_libraries(${PROJECT_NAME}_bullet_lib PUBLIC Bullet3)
target_link_libraries(${PROJECT_NAME}_bullet_lib PUBLIC
Bullet3
${PROJECT_NAME}_utility_lib)
set_target_properties(${PROJECT_NAME}_bullet_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(${PROJECT_NAME}_types_lib STATIC
src/Geometry/Pose.cpp
src/Geometry/Polygon.cpp
src/BasicTypes/Area.cpp
src/BasicTypes/Entity.cpp
src/BasicTypes/BodyPart.cpp
src/BasicTypes/Object.cpp
Expand All @@ -142,20 +160,16 @@ target_link_libraries(${PROJECT_NAME}_types_lib PUBLIC
${PROJECT_NAME}_bullet_lib)
set_target_properties(${PROJECT_NAME}_types_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(${PROJECT_NAME}_utility_lib STATIC
src/Utility/YamlReader.cpp
)
target_link_libraries(${PROJECT_NAME}_utility_lib PUBLIC
${catkin_LIBRARIES})
set_target_properties(${PROJECT_NAME}_utility_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(${PROJECT_NAME}_perception_lib STATIC
src/Perception/Managers/AgentPerceptionManager.cpp
src/Perception/Managers/AreasPerceptionManager.cpp
src/Perception/Managers/ObjectsPerceptionManager.cpp
src/Perception/Managers/RobotsPerceptionManager.cpp
src/Perception/Managers/HumansPerceptionManager.cpp
src/Perception/Modules/ObjectsModules/ObjectsEmulatedPerceptionModule.cpp
src/Perception/Modules/HumansModules/HumansEmulatedPerceptionModule.cpp
src/Perception/PerceptionManager.cpp
src/Perception/Modules/AreasModules/AreasEmulatedPerceptionModule.cpp
src/Perception/PerceptionManagers.cpp
)
target_link_libraries(${PROJECT_NAME}_perception_lib PUBLIC
${catkin_LIBRARIES}
Expand Down Expand Up @@ -193,9 +207,9 @@ add_library(overworld_modules_plugin MODULE
src/Perception/Modules/ObjectsModules/StaticObjectsPerceptionModule.cpp
src/Perception/Modules/ObjectsModules/FakeObjectPerceptionModule.cpp
src/Perception/Modules/RobotsModules/JointStatePerceptionModule.cpp
src/Perception/Modules/RobotsModules/FakeRobotPerceptionModule.cpp
src/Perception/Modules/HumansModules/StampedPosePerceptionModule.cpp
src/Perception/Modules/HumansModules/FakeHumanPerceptionModule.cpp
src/Perception/Modules/AreasModules/ObjAreasPerceptionModule.cpp
)
target_link_libraries(overworld_modules_plugin PUBLIC
${catkin_LIBRARIES}
Expand All @@ -220,13 +234,18 @@ target_link_libraries(${PROJECT_NAME}_node PRIVATE
${PROJECT_NAME}_perception_lib
${PROJECT_NAME}_sender_lib
${PROJECT_NAME}_facts_lib
${catkin_LIBRARIES})
${catkin_LIBRARIES}
${ontologenius_LIBRARIES})
add_dependencies(${PROJECT_NAME}_node overworld_gencpp)

add_executable(plugins src/Nodes/plugins.cpp)
target_link_libraries(plugins ${catkin_LIBRARIES}
${PROJECT_NAME}_bullet_lib)

add_executable(teleop src/Nodes/teleop.cpp)
target_link_libraries(teleop ${catkin_LIBRARIES})
add_dependencies(teleop overworld_gencpp)

#################
# Test files #
#################
Expand All @@ -236,6 +255,7 @@ target_link_libraries(${PROJECT_NAME}_bullet_test PRIVATE
${PROJECT_NAME}_bullet_lib
${PROJECT_NAME}_types_lib
${PROJECT_NAME}_perception_lib
${PROJECT_NAME}_utility_lib
${catkin_LIBRARIES})

add_executable(${PROJECT_NAME}_multi_server_test src/TestFiles/multi_server_test.cpp )
Expand All @@ -255,4 +275,8 @@ target_link_libraries(${PROJECT_NAME}_gravity_test PRIVATE
${PROJECT_NAME}_types_lib
${PROJECT_NAME}_bullet_lib
${catkin_LIBRARIES})
add_dependencies(${PROJECT_NAME}_gravity_test overworld_gencpp)
add_dependencies(${PROJECT_NAME}_gravity_test overworld_gencpp)

add_executable(${PROJECT_NAME}_area_test src/TestFiles/area.cpp )
target_link_libraries(${PROJECT_NAME}_area_test PRIVATE
${PROJECT_NAME}_types_lib)
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ The knowledge base Ontologenius can be used as a source of information for Overw

More information about this link and tutorials to show its use will come soon.

[Release-Url]: https://github.com/sarthou/overworld/releases/tag/v0.1.3
[Release-Image]: http://img.shields.io/badge/release-v0.1.3-blue
[Release-Url]: https://github.com/sarthou/overworld/releases/tag/v0.1.4
[Release-Image]: http://img.shields.io/badge/release-v0.1.4-blue

[Ontologenius-Dependency-Image]: https://img.shields.io/badge/dependencies-ontologenius-yellow
[Ontologenius-Dependency-Url]: https://github.com/sarthou/ontologenius
Expand Down
28 changes: 28 additions & 0 deletions config/adream_areas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
adream_kitchen:
pose:
z: 1.75
polygon_path: package://overworld/models/areas/adream_kitchen.obj
half_height: 1.75
hysteresis: 0.2

adream_bedroom:
pose:
z: 1.75
polygon_path: package://overworld/models/areas/adream_bedroom.obj
half_height: 1.75
hysteresis: 0.2

adream_saloon:
pose:
z: 1.75
polygon_path: package://overworld/models/areas/adream_saloon.obj
half_height: 1.75
hysteresis: 0.2

#eve_area:
# pose:
# z: 0.5
# half_height: 0.5
# radius: 0.5
# hysteresis: 0.05
# owner: base_link
6 changes: 2 additions & 4 deletions config/config_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ modules:
StaticObjectsPerceptionModule: static

robot_joints:
name : pr2
right_hand : r_gripper_tool_frame
left_hand : l_gripper_tool_frame
head : head_mount_kinect2_rgb_optical_frame
min_period : 0.09
robot_name: pr2

pr2_left_gripper:
side: 0 # = left
Expand Down
18 changes: 18 additions & 0 deletions config/config_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
modules:
robot:
JointStatePerceptionModule: robot_joints
objects:
ArTrackPerceptionModule: ar_track
StaticObjectsPerceptionModule: static
areas:
ObjAreasPerceptionModule: obj_area

robot_joints:
min_period : 0.09
robot_name: eve

static:
file: package://overworld/config/adream.yaml

obj_area:
file: package://overworld/config/adream_areas.yaml
Loading

0 comments on commit 1550f31

Please sign in to comment.