diff --git a/.gitignore b/.gitignore index cfee5e7..ebb0632 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,169 @@ +# Created by https://www.toptal.com/developers/gitignore/api/ros2,c++,cmake,visualstudiocode,clion +# Edit at https://www.toptal.com/developers/gitignore?templates=ros2,c++,cmake,visualstudiocode,clion -# Created by https://www.toptal.com/developers/gitignore/api/ros2 -# Edit at https://www.toptal.com/developers/gitignore?templates=ros2 +### C++ ### +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +### CLion ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### CLion Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# Azure Toolkit for IntelliJ plugin +# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij +.idea/**/azureSettings.xml + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ ### ROS2 ### install/ @@ -16,7 +179,6 @@ build/ .cproject # qcreator stuff -CMakeLists.txt.user srv/_*.py *.pcd @@ -33,6 +195,27 @@ qtcreator-* COLCON_IGNORE AMENT_IGNORE -# End of https://www.toptal.com/developers/gitignore/api/ros2 +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/ros2,c++,cmake,visualstudiocode,clion + +.cache +.ccls-cache -.vscode \ No newline at end of file diff --git a/src/btree_nodes/src/Extensions.cpp b/src/btree_nodes/src/Extensions.cpp index 7e4eb1e..730dbbd 100644 --- a/src/btree_nodes/src/Extensions.cpp +++ b/src/btree_nodes/src/Extensions.cpp @@ -50,13 +50,13 @@ namespace BT { } auto pose = std::make_shared(); - pose->orientation.w=0; - pose->orientation.x=0; - pose->orientation.y=1; - pose->orientation.z=0; - pose->position.x= convertFromString(parts[0]); - pose->position.y= convertFromString(parts[1]); - pose->position.z= convertFromString(parts[2]); + pose->orientation.w = 0; + pose->orientation.x = 0; + pose->orientation.y = 1; + pose->orientation.z = 0; + pose->position.x = convertFromString(parts[0]); + pose->position.y = convertFromString(parts[1]); + pose->position.z = convertFromString(parts[2]); std::cout << "[ generated pose from string ]" << std::endl; @@ -71,9 +71,9 @@ namespace BT { } auto point = std::make_shared(); - point->x= convertFromString(parts[0]); - point->y= convertFromString(parts[1]); - point->z= convertFromString(parts[2]); + point->x = convertFromString(parts[0]); + point->y = convertFromString(parts[1]); + point->z = convertFromString(parts[2]); return point; } @@ -86,10 +86,10 @@ namespace BT { } auto point = std::make_shared(); - point->w= convertFromString(parts[0]); - point->x= convertFromString(parts[1]); - point->y= convertFromString(parts[2]); - point->z= convertFromString(parts[3]); + point->w = convertFromString(parts[0]); + point->x = convertFromString(parts[1]); + point->y = convertFromString(parts[2]); + point->z = convertFromString(parts[3]); return point; } diff --git a/src/gaz_simulation/world/gaz_ign.sdf b/src/gaz_simulation/world/gaz_ign.sdf index 2e20d66..a9ebc9e 100644 --- a/src/gaz_simulation/world/gaz_ign.sdf +++ b/src/gaz_simulation/world/gaz_ign.sdf @@ -247,12 +247,9 @@ 0 1 1.25 0 0 0 - https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae + /home/ros/go.dae 1.0 - - https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae - 2 2 1 1.15 diff --git a/src/ign_actor_plugin/src/ActorSystem.cpp b/src/ign_actor_plugin/src/ActorSystem.cpp index d14208c..899ff50 100644 --- a/src/ign_actor_plugin/src/ActorSystem.cpp +++ b/src/ign_actor_plugin/src/ActorSystem.cpp @@ -8,6 +8,9 @@ #define AnimationGoalPtr const std::shared_ptr #define AnimationServerGoalPtr const std::shared_ptr>& +#define MovementGoalPtr const std::shared_ptr +#define MovementServerGoalPtr const std::shared_ptr>& + IGNITION_ADD_PLUGIN( ActorSystem, ignition::gazebo::System, @@ -41,8 +44,6 @@ void ActorSystem::Configure(const ignition::gazebo::Entity &_entity, const std:: node = rclcpp::Node::make_shared("moveService", topic); -#pragma clang diagnostic push -#pragma ide diagnostic ignored "UnusedValue" animationServer = rclcpp_action::create_server( node, "animation", @@ -58,12 +59,17 @@ void ActorSystem::Configure(const ignition::gazebo::Entity &_entity, const std:: } ); - movementServer rclcpp_action::create_server( + movementServer = rclcpp_action::create_server( node, "movement", - [](rclcpp_action::GoalUUID goalUuid, ) - ) -#pragma clang diagnostic pop + [](rclcpp_action::GoalUUID goalUuid, MovementGoalPtr &movementGoal ){ + return rclcpp_action::GoalResponse::ACCEPT_AND_EXECUTE; + }, + [](MovementServerGoalPtr goalUuid ){ + return rclcpp_action::CancelResponse::ACCEPT; + }, + [](MovementServerGoalPtr goalUuid ){} + ); printf("Spinning node...\n"); std::thread spinThread([this]() {