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

Plugin states #5

Open
wants to merge 3 commits into
base: add-generated-artefacts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
117 changes: 71 additions & 46 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
cmake_minimum_required(VERSION 3.0.2)
project(floorplan-dsl-environments)
cmake_minimum_required(VERSION 3.8)
project(floorplan_models)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED gazebo_ros)
## Find colcon macros and libraries
## if COMPONENTS list like find_package(COLCON REQUIRED COMPONENTS xyz)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these commented out changes needed? Perhaps you can remove all the commented out generated CMake configs? I think, if needed, it's rather easy to generate a new one or look it up online. If you change the generated entries, then they also lose their reference purpose.

## is used, also find other colcon packages
#find_package(COLCON REQUIRED COMPONENTS
# gz_cmake_vendor
# gz-cmake3
# gz_physics_vendor
# gz-physics
# gz_utils_vendor
# gz-utils
# gz_plugin_vendor
# gz-plugin
# Eigen3
# gz_math_vendor
# gz-math
# gz_common_vendor
# gz-common
# # gz_msgs_vendor
# # gz-msgs
# gz_sim_vendor
# gz-sim
#)

# Find Gazebo
find_package(ament_cmake REQUIRED)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)




## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
## See http://ros.org/doc/api/colcon/html/user_guide/setup_dot_py.html
# colcon_python_setup()

################################################
## Declare ROS messages, services and actions ##
Expand All @@ -34,9 +57,9 @@ find_package(catkin REQUIRED gazebo_ros)
## * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## find_package(COLCON REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## colcon_package(COLCON_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
Expand Down Expand Up @@ -79,7 +102,7 @@ find_package(catkin REQUIRED gazebo_ros)
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
## find_package(COLCON REQUIRED COMPONENTS ...)
## * uncomment the "generate_dynamic_reconfigure_options" section below
## and list every .cfg file to be processed

Expand All @@ -90,46 +113,48 @@ find_package(catkin REQUIRED gazebo_ros)
# )

###################################
## catkin specific configuration ##
## colcon specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## The colcon_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## colcon_DEPENDS: colcon_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES floorplan-dsl-environments
CATKIN_DEPENDS gazebo_ros
# DEPENDS system_lib
)
#colcon_package(
## INCLUDE_DIRS include
## LIBRARIES floorplan_gazebo_plugins
## COLCON_DEPENDS gazebo_ros
## DEPENDS system_lib
#)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
# ${catkin_INCLUDE_DIRS}
)
#include_directories(
## include
# ${COLCON_INCLUDE_DIRS}
#)



## Declare a C++ library
# add_library(${PROJECT_NAME}
# src/${PROJECT_NAME}/floorplan-dsl-environments.cpp
# src/${PROJECT_NAME}/floorplan_gazebo_plugins.cpp
# )

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${COLCON_EXPORTED_TARGETS})

## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## With colcon_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/floorplan-dsl-environments_node.cpp)
# add_executable(${PROJECT_NAME}_node src/floorplan_gazebo_plugins_node.cpp)

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
Expand All @@ -139,44 +164,44 @@ include_directories(

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${COLCON_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
# ${catkin_LIBRARIES}
# ${COLCON_LIBRARIES}
# )

#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
# all install targets should use colcon DESTINATION variables
# See http://ros.org/doc/api/colcon/html/adv_user_guide/variables.html

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
catkin_install_python(PROGRAMS
scripts/simple_exsce_recorder
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# colcon_install_python(PROGRAMS
# scripts/my_python_script
# DESTINATION ${COLCON_PACKAGE_BIN_DESTINATION}
# )

## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
## See http://docs.ros.org/melodic/api/colcon/html/howto/format1/building_executables.html
# install(TARGETS ${PROJECT_NAME}_node
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# RUNTIME DESTINATION ${COLCON_PACKAGE_BIN_DESTINATION}
# )

## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
## See http://docs.ros.org/melodic/api/colcon/html/howto/format1/building_libraries.html
# install(TARGETS ${PROJECT_NAME}
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# ARCHIVE DESTINATION ${COLCON_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${COLCON_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${COLCON_GLOBAL_BIN_DESTINATION}
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# DESTINATION ${COLCON_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
Expand All @@ -185,18 +210,18 @@ catkin_install_python(PROGRAMS
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# DESTINATION ${COLCON_PACKAGE_SHARE_DESTINATION}
# )

#############
## Testing ##
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_floorplan-dsl-environments.cpp)
# colcon_add_gtest(${PROJECT_NAME}-test test/test_floorplan_gazebo_plugins.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
# colcon_add_nosetests(test)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"@context": [
{
"pl": "https://secorolab.github.io/metamodels/plugin#",
"door": "https://secorolab.github.io/models/door#"
},
"https://secorolab.github.io/metamodels/floor-plan/object.json",
"https://secorolab.github.io/metamodels/floor-plan/plugin.json"
],
"@graph": [
{
"@id": "pl:door-opened-to-closed-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-fully-opened-to-door-fully-closed"
},
{
"@id": "pl:door-closed-to-opened-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-fully-closed-to-door-fully-opened"
},
{
"@id": "pl:door-closed-to-partially-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-fully-closed-to-door-partially-opened"
},
{
"@id": "pl:door-partially-to-closed-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-partially-opened-to-door-fully-closed"
},
{
"@id": "pl:door-partially-to-opened-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-partially-opened-to-door-fully-opened"
},
{
"@id": "pl:door-opened-to-partially-adversarial-plugin",
"@type": "PluginConfiguration",
"plugin-type": "adversarial",
"transition": "door:transition-from-door-fully-opened-to-door-partially-opened"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"@context": [
{
"pl": "https://secorolab.github.io/metamodels/plugin#",
"door": "https://secorolab.github.io/models/door#"
},
"https://secorolab.github.io/metamodels/floor-plan/object.json",
"https://secorolab.github.io/metamodels/floor-plan/plugin.json"
],
"@graph": [
{
"@id": "pl:door-dynamic-plugin",
"@type": "PluginConfiguration",
"plugin-type": "dynamic"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@context": [
{
"pl": "https://secorolab.github.io/metamodels/plugin#",
"door": "https://secorolab.github.io/models/door#"
},
"https://secorolab.github.io/metamodels/floor-plan/object.json",
"https://secorolab.github.io/metamodels/floor-plan/plugin.json"
],
"@graph": [
{
"@id": "pl:door-fully-opened-init-plugin",
"@type": "PluginConfiguration",
"plugin-type": "initial",
"state": "door:door-fully-opened"
},
{
"@id": "pl:door-partially-opened-init-plugin",
"@type": "PluginConfiguration",
"plugin-type": "initial",
"state": "door:door-partially-opened"
},
{
"@id": "pl:door-fully-closed-init-plugin",
"@type": "PluginConfiguration",
"plugin-type": "initial",
"state": "door:door-fully-opened"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"https://comp-rob2b.github.io/metamodels/geometry/structural-entities.json",
"https://comp-rob2b.github.io/metamodels/geometry/coordinates.json",
"https://secorolab.github.io/metamodels/floor-plan/object.json",
"https://secorolab.github.io/metamodels/floor-plan/plugin.json",
"https://secorolab.github.io/metamodels/geometry/polytope.json",
"https://secorolab.github.io/metamodels/floor-plan/state.json",
"https://comp-rob2b.github.io/metamodels/qudt.json",
Expand Down Expand Up @@ -54,12 +55,24 @@
"frame": "geom:frame-location-door-1",
"of-object": "door:door",
"world": "floorplan:frontiers_brsu_building_c",
"start-state": "door:door-partially-opened"
"plugins": [
{
"@id": "pl:door-opened-to-closed-adversarial-plugin",
"distance": "0.9"
},
{
"@id": "pl:door-dynamic-plugin",
"uri": "testURI"
},
{
"@id": "pl:door-partially-opened-init-plugin"
}
]
},
{
"@id": "world-frame-tag",
"@type": "WorldFrame",
"frame": "geom:world-frame"
}
]
}
}
Loading