Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Dec 14, 2022
2 parents 238402c + de0da48 commit b9e1c33
Show file tree
Hide file tree
Showing 76 changed files with 2,761 additions and 1,194 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yml → .github/workflows/overworld.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ROS CI
name: overworld CI

on: [push]

Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
sudo apt install dpkg
sudo apt install -y ros-$ROS_DISTRO-desktop qtbase5-dev qtdeclarative5-dev
sudo apt install -y libcppunit-dev
sudo apt install ros-$ROS_DISTRO-pcl-ros ros-$ROS_DISTRO-tf2-geometry-msgs ros-$ROS_DISTRO-pr2-common
sudo apt install ros-$ROS_DISTRO-pcl-ros ros-$ROS_DISTRO-tf2-geometry-msgs
if [ $ROS_DISTRO != noetic ]
then
sudo apt-get install python-rosdep
Expand Down Expand Up @@ -64,13 +64,7 @@ jobs:
make install
cd ~/work
git clone -b dev https://github.com/sarthou/ontologenius.git
git clone https://github.com/RIS-WITH/optitrack_msgs.git
if [ $ROS_DISTRO != noetic ]
then
git clone https://github.com/sarthou/ar_track_alvar.git
else
git clone -b noetic-devel https://github.com/sarthou/ar_track_alvar.git
fi
- name: build
run: |
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/overworld_modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: overworld modules CI

on: [push]

jobs:
build:

runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-18.04]
include:
- operating-system: ubuntu-18.04
distro: melodic
- operating-system: ubuntu-20.04
distro: noetic
env:
ROS_CI_DESKTOP: "`lsb_release -cs`"
CI_SOURCE_PATH: $(pwd)
ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
ROS_PARALLEL_JOBS: '-j8 -l6'
# Set the python path manually to include /usr/-/python2.7/dist-packages
# as this is where apt-get installs python packages.
PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages:/usr/lib/python3.8/dist-packages:/usr/local/lib/python3.8/dist-packages
ROS_DISTRO: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v1
- name: Install ROS
run: |
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update -qq
sudo apt install dpkg
sudo apt install -y ros-$ROS_DISTRO-desktop qtbase5-dev qtdeclarative5-dev
sudo apt install -y libcppunit-dev
sudo apt install ros-$ROS_DISTRO-pcl-ros ros-$ROS_DISTRO-tf2-geometry-msgs ros-$ROS_DISTRO-pr2-common
if [ $ROS_DISTRO != noetic ]
then
sudo apt-get install python-rosdep
else
sudo apt-get install python3-rosdep
fi
source /opt/ros/$ROS_DISTRO/setup.bash
sudo rosdep init
rosdep update --include-eol-distros # Support EOL distros.
if [ $ROS_DISTRO != noetic ]
then
pip install requests --user
else
pip3 install requests --user
fi
- name: Install dependencies
run: |
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
cd ~/work
git clone -b dev https://github.com/sarthou/ontologenius.git
- name: Install modules
run: |
cd ~/work
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
cd ..
git clone https://github.com/RIS-WITH/optitrack_msgs.git
if [ $ROS_DISTRO != noetic ]
then
git clone https://github.com/sarthou/ar_track_alvar.git
else
git clone -b noetic-devel https://github.com/sarthou/ar_track_alvar.git
fi
- name: build
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
source devel/setup.bash
cd ~/catkin_ws/src
ln -s ~/work
cd ..
export BULLET_INSTALL_PATH=~/dependencies/bullet3/install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BULLET_INSTALL_PATH/lib
catkin_make
41 changes: 28 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ find_package(catkin REQUIRED COMPONENTS
tf2_geometry_msgs
roslib
message_filters
ar_track_alvar_msgs
sensor_msgs
visualization_msgs
geometry_msgs
optitrack_msgs
cv_bridge
pluginlib
)
Expand Down Expand Up @@ -66,6 +64,9 @@ endforeach()
add_message_files(
FILES
Triplet.msg
EntityPose.msg
EntitiesPoses.msg
AgentPose.msg
)

add_service_files(
Expand All @@ -92,9 +93,9 @@ generate_messages(
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES overworld
CATKIN_DEPENDS ontologenius roscpp std_msgs tf2 tf2_ros roslib
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}_bullet_lib ${PROJECT_NAME}_types_lib ${PROJECT_NAME}_utility_lib
CATKIN_DEPENDS ontologenius roscpp std_msgs tf2 tf2_ros roslib
# DEPENDS system_lib
)

Expand Down Expand Up @@ -141,19 +142,26 @@ 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/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/PerceptionConfiguration.cpp
)
target_link_libraries(${PROJECT_NAME}_perception_lib PUBLIC
${catkin_LIBRARIES}
${PROJECT_NAME}_bullet_lib
${PROJECT_NAME}_types_lib)
${PROJECT_NAME}_types_lib
${PROJECT_NAME}_utility_lib)

add_library(${PROJECT_NAME}_facts_lib STATIC
src/Facts/Publisher/FactsPublisher.cpp
Expand All @@ -169,6 +177,7 @@ add_library(${PROJECT_NAME}_sender_lib STATIC
src/Senders/ROSSender.cpp
src/Senders/PoseSender.cpp
src/Senders/Bernie.cpp
src/Senders/RelationsSender.cpp
)
target_link_libraries(${PROJECT_NAME}_sender_lib PUBLIC
${catkin_LIBRARIES}
Expand All @@ -181,21 +190,23 @@ target_link_libraries(${PROJECT_NAME}_sender_lib PUBLIC
#################

add_library(overworld_modules_plugin MODULE
src/Perception/Modules/ObjectsModules/ArTrackPerceptionModule.cpp
src/Perception/Modules/ObjectsModules/StaticObjectsPerceptionModule.cpp
src/Perception/Modules/ObjectsModules/Pr2GripperPerceptionModule.cpp
src/Perception/Modules/RobotsModules/PR2JointsPerception.cpp
src/Perception/Modules/HumansModules/OptitrackPerceptionModule.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
)
target_link_libraries(overworld_modules_plugin PUBLIC
${catkin_LIBRARIES}
${PROJECT_NAME}_bullet_lib
${PROJECT_NAME}_types_lib)
${PROJECT_NAME}_types_lib
${PROJECT_NAME}_utility_lib)

add_library(overworld_reasoner_plugin
src/OntologeniusPlugins/ReasonerEgocentric.cpp
)
add_dependencies(overworld_reasoner_plugin overworld_gencpp)
add_dependencies(overworld_reasoner_plugin overworld_gencpp ${catkin_EXPORTED_TARGETS})
target_link_libraries(overworld_reasoner_plugin PUBLIC
${catkin_LIBRARIES}
${ontologenius_LIBRARIES})
Expand All @@ -212,6 +223,10 @@ target_link_libraries(${PROJECT_NAME}_node PRIVATE
${catkin_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)

#################
# Test files #
#################
Expand Down
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.2
[Release-Image]: http://img.shields.io/badge/release-v0.1.2-blue
[Release-Url]: https://github.com/sarthou/overworld/releases/tag/v0.1.3
[Release-Image]: http://img.shields.io/badge/release-v0.1.3-blue

[Ontologenius-Dependency-Image]: https://img.shields.io/badge/dependencies-ontologenius-yellow
[Ontologenius-Dependency-Url]: https://github.com/sarthou/ontologenius
Expand Down
93 changes: 93 additions & 0 deletions config/adream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
adream_walls:
orientation:
z: 1.57

adream_floor:
orientation:
z: 1.57

adream_window_h10_1:
orientation:
z: 1.57

adream_window_h10_2:
orientation:
z: 1.57

adream_window_h20_1:
orientation:
z: 1.57

adream_window_h20_2:
orientation:
z: 1.57

adream_window_h20_3:
orientation:
z: 1.57

adream_appartment:
orientation:
z: 1.57

adream_door_h21_1:
position:
x: 1.03963
y: -0.00339
z: 1.0725
orientation:
z: 1.57

adream_door_h21_2:
position:
x: 5.09035
y: 18.4801
z: 1.0725
orientation:
z: 1.57

adream_door_h21_3:
position:
x: 0.932577
y: 18.4514
z: 1.0725
orientation:
z: 1.57

adream_door_h16:
position:
x: -0.152311
y: 22.3506
z: 1.0725
orientation:
z: 3.14159

adream_door_h12:
position:
x: -11.5018
y: 11.6701
z: 1.0725
orientation:
z: 2.51327

adream_door_h14:
position:
x: -6.56428
y: 9.44934
z: 1.0725

adream_door_h13:
position:
x: -10.236
y: 11.2895
z: 1.0725
orientation:
z: -0.942478

adream_door_h11:
position:
x: -9.51151
y: 14.0825
z: 1.0725
orientation:
z: -0.942478
11 changes: 7 additions & 4 deletions config/config_example.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
modules:
robot:
PR2JointsPerception: pr2_joints
JointStatePerceptionModule: robot_joints
humans:
OptitrackPerceptionModule: optitrack
objects:
Expand All @@ -10,8 +10,8 @@ modules:
- pr2_right_gripper
StaticObjectsPerceptionModule: static

pr2_joints:
name : pr2_robot
robot_joints:
name : pr2
right_hand : r_gripper_tool_frame
left_hand : l_gripper_tool_frame
head : head_mount_kinect2_rgb_optical_frame
Expand All @@ -28,4 +28,7 @@ pr2_right_gripper:
optitrack:
name: human_0
offset_x: 6.4868
offset_y: 2.8506
offset_y: 2.8506

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

0 comments on commit b9e1c33

Please sign in to comment.