diff --git a/CMakeLists.txt b/CMakeLists.txt index dd5c2991..3689123d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,13 @@ # Read the full text in the LICENSE.md file. # -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.10.2) project(gazebo-rcll) include(GNUInstallDirs) include(third_party/third_party.cmake) - +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") set(USERDIR ".config/rcll/gazebo" CACHE diff --git a/models/tag/materials/scripts/label.material b/models/tag/materials/scripts/label.material index 4089d36f..23ff8fdd 100644 --- a/models/tag/materials/scripts/label.material +++ b/models/tag/materials/scripts/label.material @@ -1,18 +1,20 @@ -material tag/empty +material tag/tag_101 { receive_shadows off technique { - pass main + pass { - ambient 1 1 1 1.0 - diffuse 1 1 1 1.0 - specular 1 1 1 1.000000 1.500000 + texture_unit + { + texture figure_101.png + filtering anistropic + max_anisotropy 16 + } } } } - -material tag/tag_01 +material tag/tag_102 { receive_shadows off technique @@ -21,15 +23,14 @@ material tag/tag_01 { texture_unit { - texture tag01.png + texture figure_102.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_02 +material tag/tag_103 { receive_shadows off technique @@ -38,15 +39,14 @@ material tag/tag_02 { texture_unit { - texture tag02.png + texture figure_103.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_17 +material tag/tag_104 { receive_shadows off technique @@ -55,15 +55,14 @@ material tag/tag_17 { texture_unit { - texture tag17.png + texture figure_104.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_18 +material tag/tag_111 { receive_shadows off technique @@ -72,15 +71,14 @@ material tag/tag_18 { texture_unit { - texture tag18.png + texture figure_111.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_33 +material tag/tag_112 { receive_shadows off technique @@ -89,15 +87,14 @@ material tag/tag_33 { texture_unit { - texture tag33.png + texture figure_112.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_34 +material tag/tag_113 { receive_shadows off technique @@ -106,15 +103,14 @@ material tag/tag_34 { texture_unit { - texture tag34.png + texture figure_113.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_177 +material tag/tag_114 { receive_shadows off technique @@ -123,15 +119,14 @@ material tag/tag_177 { texture_unit { - texture tag177.png + texture figure_114.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_178 +material tag/tag_121 { receive_shadows off technique @@ -140,15 +135,14 @@ material tag/tag_178 { texture_unit { - texture tag178.png + texture figure_121.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_65 +material tag/tag_122 { receive_shadows off technique @@ -157,15 +151,14 @@ material tag/tag_65 { texture_unit { - texture tag65.png + texture figure_122.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_66 +material tag/tag_131 { receive_shadows off technique @@ -174,15 +167,14 @@ material tag/tag_66 { texture_unit { - texture tag66.png + texture figure_131.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_81 +material tag/tag_132 { receive_shadows off technique @@ -191,15 +183,14 @@ material tag/tag_81 { texture_unit { - texture tag81.png + texture figure_132.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_82 +material tag/tag_141 { receive_shadows off technique @@ -208,15 +199,14 @@ material tag/tag_82 { texture_unit { - texture tag82.png + texture figure_141.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_97 +material tag/tag_142 { receive_shadows off technique @@ -225,15 +215,14 @@ material tag/tag_97 { texture_unit { - texture tag97.png + texture figure_142.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_98 +material tag/tag_201 { receive_shadows off technique @@ -242,15 +231,14 @@ material tag/tag_98 { texture_unit { - texture tag98.png + texture figure_201.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_113 +material tag/tag_202 { receive_shadows off technique @@ -259,15 +247,30 @@ material tag/tag_113 { texture_unit { - texture tag113.png + texture figure_202.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_114 +material tag/tag_203 +{ + receive_shadows off + technique + { + pass + { + texture_unit + { + texture figure_203.png + filtering anistropic + max_anisotropy 16 + } + } + } +} +material tag/tag_204 { receive_shadows off technique @@ -276,15 +279,14 @@ material tag/tag_114 { texture_unit { - texture tag114.png + texture figure_204.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_129 +material tag/tag_211 { receive_shadows off technique @@ -293,15 +295,14 @@ material tag/tag_129 { texture_unit { - texture tag129.png + texture figure_211.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_130 +material tag/tag_212 { receive_shadows off technique @@ -310,15 +311,14 @@ material tag/tag_130 { texture_unit { - texture tag130.png + texture figure_212.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_145 +material tag/tag_213 { receive_shadows off technique @@ -327,15 +327,14 @@ material tag/tag_145 { texture_unit { - texture tag145.png + texture figure_213.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_146 +material tag/tag_214 { receive_shadows off technique @@ -344,15 +343,14 @@ material tag/tag_146 { texture_unit { - texture tag146.png + texture figure_214.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_161 +material tag/tag_221 { receive_shadows off technique @@ -361,15 +359,14 @@ material tag/tag_161 { texture_unit { - texture tag161.png + texture figure_221.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_162 +material tag/tag_222 { receive_shadows off technique @@ -378,15 +375,14 @@ material tag/tag_162 { texture_unit { - texture tag162.png + texture figure_222.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_49 +material tag/tag_231 { receive_shadows off technique @@ -395,15 +391,14 @@ material tag/tag_49 { texture_unit { - texture tag49.png + texture figure_231.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_50 +material tag/tag_232 { receive_shadows off technique @@ -412,15 +407,14 @@ material tag/tag_50 { texture_unit { - texture tag50.png + texture figure_232.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_193 +material tag/tag_241 { receive_shadows off technique @@ -429,15 +423,14 @@ material tag/tag_193 { texture_unit { - texture tag193.png + texture figure_241.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_194 +material tag/tag_242 { receive_shadows off technique @@ -446,15 +439,14 @@ material tag/tag_194 { texture_unit { - texture tag194.png + texture figure_242.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_209 +material tag/tag_301 { receive_shadows off technique @@ -463,15 +455,14 @@ material tag/tag_209 { texture_unit { - texture tag209.png + texture figure_301.png filtering anistropic max_anisotropy 16 } } } } - -material tag/tag_210 +material tag/tag_302 { receive_shadows off technique @@ -480,7 +471,7 @@ material tag/tag_210 { texture_unit { - texture tag210.png + texture figure_302.png filtering anistropic max_anisotropy 16 } diff --git a/models/tag/materials/textures/figure_101.png b/models/tag/materials/textures/figure_101.png new file mode 100644 index 00000000..38ef9a4e Binary files /dev/null and b/models/tag/materials/textures/figure_101.png differ diff --git a/models/tag/materials/textures/figure_102.png b/models/tag/materials/textures/figure_102.png new file mode 100644 index 00000000..a8c0bf0c Binary files /dev/null and b/models/tag/materials/textures/figure_102.png differ diff --git a/models/tag/materials/textures/figure_103.png b/models/tag/materials/textures/figure_103.png new file mode 100644 index 00000000..8ae7259b Binary files /dev/null and b/models/tag/materials/textures/figure_103.png differ diff --git a/models/tag/materials/textures/figure_104.png b/models/tag/materials/textures/figure_104.png new file mode 100644 index 00000000..0932ab09 Binary files /dev/null and b/models/tag/materials/textures/figure_104.png differ diff --git a/models/tag/materials/textures/figure_111.png b/models/tag/materials/textures/figure_111.png new file mode 100644 index 00000000..a0eb80a8 Binary files /dev/null and b/models/tag/materials/textures/figure_111.png differ diff --git a/models/tag/materials/textures/figure_112.png b/models/tag/materials/textures/figure_112.png new file mode 100644 index 00000000..8981029e Binary files /dev/null and b/models/tag/materials/textures/figure_112.png differ diff --git a/models/tag/materials/textures/figure_113.png b/models/tag/materials/textures/figure_113.png new file mode 100644 index 00000000..4779ed1c Binary files /dev/null and b/models/tag/materials/textures/figure_113.png differ diff --git a/models/tag/materials/textures/figure_114.png b/models/tag/materials/textures/figure_114.png new file mode 100644 index 00000000..9d46e3c6 Binary files /dev/null and b/models/tag/materials/textures/figure_114.png differ diff --git a/models/tag/materials/textures/figure_121.png b/models/tag/materials/textures/figure_121.png new file mode 100644 index 00000000..4dfb2813 Binary files /dev/null and b/models/tag/materials/textures/figure_121.png differ diff --git a/models/tag/materials/textures/figure_122.png b/models/tag/materials/textures/figure_122.png new file mode 100644 index 00000000..89c1e921 Binary files /dev/null and b/models/tag/materials/textures/figure_122.png differ diff --git a/models/tag/materials/textures/figure_131.png b/models/tag/materials/textures/figure_131.png new file mode 100644 index 00000000..dadc8504 Binary files /dev/null and b/models/tag/materials/textures/figure_131.png differ diff --git a/models/tag/materials/textures/figure_132.png b/models/tag/materials/textures/figure_132.png new file mode 100644 index 00000000..0b770e41 Binary files /dev/null and b/models/tag/materials/textures/figure_132.png differ diff --git a/models/tag/materials/textures/figure_141.png b/models/tag/materials/textures/figure_141.png new file mode 100644 index 00000000..5f492137 Binary files /dev/null and b/models/tag/materials/textures/figure_141.png differ diff --git a/models/tag/materials/textures/figure_142.png b/models/tag/materials/textures/figure_142.png new file mode 100644 index 00000000..e9079f66 Binary files /dev/null and b/models/tag/materials/textures/figure_142.png differ diff --git a/models/tag/materials/textures/figure_201.png b/models/tag/materials/textures/figure_201.png new file mode 100644 index 00000000..00ed6e52 Binary files /dev/null and b/models/tag/materials/textures/figure_201.png differ diff --git a/models/tag/materials/textures/figure_202.png b/models/tag/materials/textures/figure_202.png new file mode 100644 index 00000000..e14dd0b6 Binary files /dev/null and b/models/tag/materials/textures/figure_202.png differ diff --git a/models/tag/materials/textures/figure_203.png b/models/tag/materials/textures/figure_203.png new file mode 100644 index 00000000..6e779d60 Binary files /dev/null and b/models/tag/materials/textures/figure_203.png differ diff --git a/models/tag/materials/textures/figure_204.png b/models/tag/materials/textures/figure_204.png new file mode 100644 index 00000000..39ede8df Binary files /dev/null and b/models/tag/materials/textures/figure_204.png differ diff --git a/models/tag/materials/textures/figure_211.png b/models/tag/materials/textures/figure_211.png new file mode 100644 index 00000000..676dc3a9 Binary files /dev/null and b/models/tag/materials/textures/figure_211.png differ diff --git a/models/tag/materials/textures/figure_212.png b/models/tag/materials/textures/figure_212.png new file mode 100644 index 00000000..b46c205b Binary files /dev/null and b/models/tag/materials/textures/figure_212.png differ diff --git a/models/tag/materials/textures/figure_213.png b/models/tag/materials/textures/figure_213.png new file mode 100644 index 00000000..b9f15705 Binary files /dev/null and b/models/tag/materials/textures/figure_213.png differ diff --git a/models/tag/materials/textures/figure_214.png b/models/tag/materials/textures/figure_214.png new file mode 100644 index 00000000..f2d694d3 Binary files /dev/null and b/models/tag/materials/textures/figure_214.png differ diff --git a/models/tag/materials/textures/figure_221.png b/models/tag/materials/textures/figure_221.png new file mode 100644 index 00000000..d8c496f7 Binary files /dev/null and b/models/tag/materials/textures/figure_221.png differ diff --git a/models/tag/materials/textures/figure_222.png b/models/tag/materials/textures/figure_222.png new file mode 100644 index 00000000..cb2ee040 Binary files /dev/null and b/models/tag/materials/textures/figure_222.png differ diff --git a/models/tag/materials/textures/figure_231.png b/models/tag/materials/textures/figure_231.png new file mode 100644 index 00000000..3fc1ae37 Binary files /dev/null and b/models/tag/materials/textures/figure_231.png differ diff --git a/models/tag/materials/textures/figure_232.png b/models/tag/materials/textures/figure_232.png new file mode 100644 index 00000000..7a9d7b0e Binary files /dev/null and b/models/tag/materials/textures/figure_232.png differ diff --git a/models/tag/materials/textures/figure_241.png b/models/tag/materials/textures/figure_241.png new file mode 100644 index 00000000..831f08d9 Binary files /dev/null and b/models/tag/materials/textures/figure_241.png differ diff --git a/models/tag/materials/textures/figure_242.png b/models/tag/materials/textures/figure_242.png new file mode 100644 index 00000000..7873a034 Binary files /dev/null and b/models/tag/materials/textures/figure_242.png differ diff --git a/models/tag/materials/textures/figure_301.png b/models/tag/materials/textures/figure_301.png new file mode 100644 index 00000000..bfa4550f Binary files /dev/null and b/models/tag/materials/textures/figure_301.png differ diff --git a/models/tag/materials/textures/figure_302.png b/models/tag/materials/textures/figure_302.png new file mode 100644 index 00000000..9354fa67 Binary files /dev/null and b/models/tag/materials/textures/figure_302.png differ diff --git a/plugins/src/plugins/gripper/gripper.cpp b/plugins/src/plugins/gripper/gripper.cpp index 1df32bf7..8033cb6c 100644 --- a/plugins/src/plugins/gripper/gripper.cpp +++ b/plugins/src/plugins/gripper/gripper.cpp @@ -183,11 +183,13 @@ Gripper::close() setPuckPose(); // link both models through a joint - gazebo::physics::LinkPtr gripperLink = getLinkEndingWith(model_, "link"); + gazebo::physics::LinkPtr gripperLink = getLinkEndingWith(model_, "gripper::link"); if (!gripperLink) { std::cerr << "Link 'gripper_grab' not found in gripper model" << std::endl; return; + } else { + std::cout << "Link 'gripper_grab' is: " << gripperLink->GetName() << std::endl; } gazebo::physics::LinkPtr puckLink = getLinkEndingWith(grippedPuck, "cylinder"); diff --git a/plugins/src/plugins/mps/mps.cpp b/plugins/src/plugins/mps/mps.cpp index e68c8260..a9f806e5 100644 --- a/plugins/src/plugins/mps/mps.cpp +++ b/plugins/src/plugins/mps/mps.cpp @@ -40,17 +40,17 @@ using namespace gazebo; //GZ_REGISTER_MODEL_PLUGIN(Mps) const std::map Mps::name_id_match = { - {"C-CS1I", "tag_01"}, {"C-CS1O", "tag_02"}, {"C-CS2I", "tag_17"}, {"C-CS2O", "tag_18"}, - {"C-RS1I", "tag_33"}, {"C-RS1O", "tag_34"}, {"C-RS2I", "tag_177"}, {"C-RS2O", "tag_178"}, - {"C-BSI", "tag_65"}, {"C-BSO", "tag_66"}, {"C-DSI", "tag_81"}, {"C-DSO", "tag_82"}, - {"M-CS1I", "tag_97"}, {"M-CS1O", "tag_98"}, {"M-CS2I", "tag_113"}, {"M-CS2O", "tag_114"}, - {"M-RS1I", "tag_129"}, {"M-RS1O", "tag_130"}, {"M-RS2I", "tag_145"}, {"M-RS2O", "tag_146"}, - {"M-BSI", "tag_161"}, {"M-BSO", "tag_162"}, {"M-DSI", "tag_49"}, {"M-DSO", "tag_50"}, - {"C-SSO", "tag_194"}, {"C-SSI", "tag_193"}, {"M-SSO", "tag_210"}, {"M-SSI", "tag_209"}}; + {"C-CS1I", "tag_102"}, {"C-CS1O", "tag_101"}, {"C-CS2I", "tag_104"}, {"C-CS2O", "tag_103"}, + {"C-RS1I", "tag_112"}, {"C-RS1O", "tag_111"}, {"C-RS2I", "tag_114"}, {"C-RS2O", "tag_113"}, + {"C-BSI", "tag_122"}, {"C-BSO", "tag_121"}, {"C-DSI", "tag_132"}, {"C-DSO", "tag_131"}, + {"M-CS1I", "tag_202"}, {"M-CS1O", "tag_201"}, {"M-CS2I", "tag_204"}, {"M-CS2O", "tag_203"}, + {"M-RS1I", "tag_212"}, {"M-RS1O", "tag_211"}, {"M-RS2I", "tag_214"}, {"M-RS2O", "tag_213"}, + {"M-BSI", "tag_222"}, {"M-BSO", "tag_221"}, {"M-DSI", "tag_232"}, {"M-DSO", "tag_231"}, + {"C-SSO", "tag_141"}, {"C-SSI", "tag_142"}, {"M-SSO", "tag_241"}, {"M-SSI", "tag_242"}}; ///Constructor Mps::Mps(physics::ModelPtr _parent, sdf::ElementPtr) -: model_(_parent), name_(model_->GetName()), sclt_in(this), sclt_base(this), shutdown_(false) +: shutdown_(false), model_(_parent), name_(model_->GetName()), sclt_in(this), sclt_base(this) { auto sinks = spdlog::default_logger()->sinks(); sinks.push_back( diff --git a/third_party/third_party.cmake b/third_party/third_party.cmake index b96aae0c..3353f06d 100644 --- a/third_party/third_party.cmake +++ b/third_party/third_party.cmake @@ -1,27 +1,29 @@ -include(FetchContent) +#include(FetchContent) find_package(spdlog QUIET) if (spdlog_FOUND) message(STATUS "Found spdlog on system") else() - message(STATUS "Fetching spdlog") - FetchContent_Declare( - spdlog - GIT_REPOSITORY https://github.com/gabime/spdlog.git - GIT_SHALLOW TRUE - GIT_TAG v1.x - ) +# message(STATUS "Fetching spdlog") +# FetchContent_Declare( +# spdlog +# GIT_REPOSITORY https://github.com/gabime/spdlog.git +# GIT_SHALLOW TRUE +# GIT_TAG v1.x +# ) set(SPDLOG_BUILD_SHARED ON) - FetchContent_MakeAvailable(spdlog) +# FetchContent_MakeAvailable(spdlog) endif() +find_package( Boost COMPONENTS system program_options filesystem thread REQUIRED ) find_package(FreeOpcUa QUIET) if (FreeOpcUa_FOUND) message(STATUS "Found FreeOpcUa on system") else() - message(STATUS "Fetching freeopcua") - FetchContent_Declare( - FreeOpcUa - GIT_REPOSITORY https://github.com/FreeOpcUa/freeopcua.git - GIT_SHALLOW TRUE - ) - FetchContent_MakeAvailable(FreeOpcUa) +# message(STATUS "Fetching freeopcua") +# FetchContent_Declare( +# FreeOpcUa +# GIT_REPOSITORY https://github.com/FreeOpcUa/freeopcua.git +# GIT_SHALLOW TRUE +# ) +# FetchContent_MakeAvailable(FreeOpcUa) + message(STATUS "Found FreeOpcUa NOT on system") endif()