From c347bbd526557bebbd73d132870e034a415d86d3 Mon Sep 17 00:00:00 2001 From: JoseAndresMR Date: Wed, 8 May 2024 22:39:26 +0200 Subject: [PATCH 1/8] [refact] renaming reasoning repos --- .gitmodules | 26 +++---- .rosinstall_ros2 | 20 +++--- .virtual_mprocs.yaml | 6 +- s_graphs/CMakeLists.txt | 4 +- s_graphs/apps/s_graphs_node.cpp | 4 +- .../include/s_graphs/common/room_utils.hpp | 16 ++--- .../include/s_graphs/common/ros_utils.hpp | 6 +- .../visualization/graph_publisher.hpp | 14 ++-- s_graphs/launch/s_graphs_launch.py | 4 +- s_graphs/package.xml | 2 +- s_graphs/src/s_graphs/common/room_utils.cpp | 6 +- s_graphs/src/s_graphs/common/ros_utils.cpp | 6 +- .../visualization/graph_publisher.cpp | 72 +++++++++---------- 13 files changed, 89 insertions(+), 97 deletions(-) diff --git a/.gitmodules b/.gitmodules index cfd7a69..cf8afbc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,25 +9,21 @@ path = utils/ndt_omp url = https://github.com/koide3/ndt_omp.git branch = master -[submodule "utils/reasoning/graph_reasoning"] - path = utils/reasoning/graph_reasoning - url = https://github.com/snt-arg/graph_reasoning.git +[submodule "utils/reasoning/situational_graphs_reasoning"] + path = utils/reasoning/situational_graphs_reasoning + url = https://github.com/snt-arg/situational_graphs_reasoning.git branch = develop -[submodule "utils/reasoning/graph_wrapper"] - path = utils/reasoning/graph_wrapper - url = https://github.com/snt-arg/graph_wrapper.git +[submodule "utils/reasoning/situational_graphs_wrapper"] + path = utils/reasoning/situational_graphs_wrapper + url = https://github.com/snt-arg/situational_graphs_wrapper.git branch = develop -[submodule "utils/reasoning/graph_datasets"] - path = utils/reasoning/graph_datasets - url = https://github.com/snt-arg/graph_datasets.git +[submodule "utils/reasoning/situational_graphs_datasets"] + path = utils/reasoning/situational_graphs_datasets + url = https://github.com/snt-argsituational_graphs_datasets.git branch = develop -[submodule "utils/reasoning/graph_matching"] - path = utils/reasoning/graph_matching - url = https://github.com/snt-arg/graph_matching.git - branch = develop -[submodule "utils/msgs/reasoning_msgs"] +[submodule "utils/msgs/situational_graphs_reasoning_msgs"] path = utils/msgs/reasoning_msgs - url = https://github.com/snt-arg/reasoning_msgs.git + url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git branch = main [submodule "utils/msgs/s_graphs_msgs"] path = utils/msgs/s_graphs_msgs diff --git a/.rosinstall_ros2 b/.rosinstall_ros2 index ccea1dc..c0d24ae 100644 --- a/.rosinstall_ros2 +++ b/.rosinstall_ros2 @@ -7,25 +7,21 @@ repositories: type: git url: https://github.com/koide3/ndt_omp.git version: master - s_graphs_utils/reasoning/graph_reasoning: + s_graphs_utils/reasoning/situational_graphs_reasoning: type: git - url: https://github.com/snt-arg/graph_reasoning.git + url: https://github.com/snt-arg/situational_graphs_reasoning.git version: complete_gnn_architecture - s_graphs_utils/reasoning/graph_wrapper: + s_graphs_utils/reasoning/situational_graphs_wrapper: type: git - url: https://github.com/snt-arg/graph_wrapper.git + url: https://github.com/snt-arg/situational_graphs_wrapper.git version: develop - s_graphs_utils/reasoning/graph_datasets: + s_graphs_utils/reasoning/situational_graphs_datasets: type: git - url: https://github.com/snt-arg/graph_datasets.git + url: https://github.com/snt-arg/situational_graphs_datasets.git version: graph_reasoning - s_graphs_utils/reasoning/graph_matching: + s_graphs_utils/msgs/situational_graphs_reasoning_msgs: type: git - url: https://github.com/snt-arg/graph_matching.git - version: develop - s_graphs_utils/msgs/reasoning_msgs: - type: git - url: https://github.com/snt-arg/reasoning_msgs.git + url: https://github.com/snt-arg/situational_graphs_reasoning_msgs.git version: main s_graphs_utils/msgs/s_graphs_msgs: type: git diff --git a/.virtual_mprocs.yaml b/.virtual_mprocs.yaml index faca665..05e337c 100644 --- a/.virtual_mprocs.yaml +++ b/.virtual_mprocs.yaml @@ -1,11 +1,11 @@ procs: rosbag: - shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"' + shell: 'bash -c "sleep 2 && source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/stugalux_oetrange_f2_3r.db3"' autostart: true stop: SIGINT s_graphs: - shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"' + shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && source ~/workspaces/reasoning_ws/install/setup.bash && source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"' autostart: true rviz: shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"' - autostart: true \ No newline at end of file + autostart: true diff --git a/s_graphs/CMakeLists.txt b/s_graphs/CMakeLists.txt index bc8d122..e19436e 100644 --- a/s_graphs/CMakeLists.txt +++ b/s_graphs/CMakeLists.txt @@ -41,7 +41,7 @@ find_package(tf2_ros REQUIRED) find_package(tf2_eigen REQUIRED) find_package(message_filters REQUIRED) find_package(geographic_msgs REQUIRED) -find_package(reasoning_msgs REQUIRED) +find_package(situational_graphs_reasoning_msgs REQUIRED) find_package(backward_ros REQUIRED) find_package(rviz_visual_tools REQUIRED) find_package(s_graphs_msgs REQUIRED) @@ -92,7 +92,7 @@ set(DEPENDENCIES tf2_ros tf2_eigen pcl_ros - reasoning_msgs + situational_graphs_reasoning_msgs visualization_msgs message_filters geographic_msgs diff --git a/s_graphs/apps/s_graphs_node.cpp b/s_graphs/apps/s_graphs_node.cpp index 901dd89..40b18ff 100644 --- a/s_graphs/apps/s_graphs_node.cpp +++ b/s_graphs/apps/s_graphs_node.cpp @@ -286,7 +286,7 @@ class SGraphsNode : public rclcpp::Node { "s_graphs/all_map_planes", 1, pub_opt); read_until_pub = this->create_publisher( "s_graphs/read_until", 32, pub_opt); - graph_pub = this->create_publisher( + graph_pub = this->create_publisher( "s_graphs/graph_structure", 32, pub_opt); dump_service_server = this->create_service( @@ -1787,7 +1787,7 @@ class SGraphsNode : public rclcpp::Node { rclcpp::Publisher::SharedPtr map_points_pub; rclcpp::Publisher::SharedPtr map_planes_pub; rclcpp::Publisher::SharedPtr all_map_planes_pub; - rclcpp::Publisher::SharedPtr graph_pub; + rclcpp::Publisher::SharedPtr graph_pub; std::shared_ptr tf_listener{nullptr}; std::unique_ptr tf_buffer; diff --git a/s_graphs/include/s_graphs/common/room_utils.hpp b/s_graphs/include/s_graphs/common/room_utils.hpp index c22fd0f..7d8b6fb 100644 --- a/s_graphs/include/s_graphs/common/room_utils.hpp +++ b/s_graphs/include/s_graphs/common/room_utils.hpp @@ -64,12 +64,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #include #include "geometry_msgs/msg/point.hpp" -#include "reasoning_msgs/msg/attribute.hpp" -#include "reasoning_msgs/msg/edge.hpp" -#include "reasoning_msgs/msg/graph.hpp" -#include "reasoning_msgs/msg/graph_keyframes.hpp" -#include "reasoning_msgs/msg/node.hpp" -#include "reasoning_msgs/msg/room_keyframe.hpp" +#include "situational_graphs_reasoning_msgs/msg/attribute.hpp" +#include "situational_graphs_reasoning_msgs/msg/edge.hpp" +#include "situational_graphs_reasoning_msgs/msg/graph.hpp" +#include "situational_graphs_reasoning_msgs/msg/graph_keyframes.hpp" +#include "situational_graphs_reasoning_msgs/msg/node.hpp" +#include "situational_graphs_reasoning_msgs/msg/room_keyframe.hpp" #include "s_graphs_msgs/msg/plane_data.hpp" #include "s_graphs_msgs/msg/planes_data.hpp" #include "s_graphs_msgs/msg/room_data.hpp" @@ -318,10 +318,10 @@ class RoomsKeyframeGenerator : public s_graphs::Rooms { const std::map* keyframes_; }; -reasoning_msgs::msg::RoomKeyframe convertExtendedRoomToRosMsg( +situational_graphs_reasoning_msgs::msg::RoomKeyframe convertExtendedRoomToRosMsg( const ExtendedRooms& room); ExtendedRooms obtainExtendedRoomFromRosMsg( - const reasoning_msgs::msg::RoomKeyframe& msg); + const situational_graphs_reasoning_msgs::msg::RoomKeyframe& msg); #endif diff --git a/s_graphs/include/s_graphs/common/ros_utils.hpp b/s_graphs/include/s_graphs/common/ros_utils.hpp index 03aa857..f795c86 100644 --- a/s_graphs/include/s_graphs/common/ros_utils.hpp +++ b/s_graphs/include/s_graphs/common/ros_utils.hpp @@ -41,7 +41,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #include "geometry_msgs/msg/pose.hpp" #include "geometry_msgs/msg/pose_stamped.hpp" #include "geometry_msgs/msg/transform_stamped.hpp" -#include "reasoning_msgs/msg/keyframe.hpp" +#include "situational_graphs_reasoning_msgs/msg/keyframe.hpp" #include "nav_msgs/msg/odometry.hpp" #include "rclcpp/rclcpp.hpp" #include "s_graphs/common/keyframe.hpp" @@ -110,7 +110,7 @@ Eigen::Isometry3d odom2isometry(const nav_msgs::msg::Odometry::SharedPtr& odom_m * @param * @return */ -KeyFrame ROS2Keyframe(const reasoning_msgs::msg::Keyframe& msg); +KeyFrame ROS2Keyframe(const situational_graphs_reasoning_msgs::msg::Keyframe& msg); /** * @brief @@ -118,7 +118,7 @@ KeyFrame ROS2Keyframe(const reasoning_msgs::msg::Keyframe& msg); * @param * @return */ -reasoning_msgs::msg::Keyframe Keyframe2ROS(const KeyFrame& keyframe); +situational_graphs_reasoning_msgs::msg::Keyframe Keyframe2ROS(const KeyFrame& keyframe); } // namespace s_graphs #endif // ROS_UTILS_HPP diff --git a/s_graphs/include/s_graphs/visualization/graph_publisher.hpp b/s_graphs/include/s_graphs/visualization/graph_publisher.hpp index 592d455..f96aa2b 100644 --- a/s_graphs/include/s_graphs/visualization/graph_publisher.hpp +++ b/s_graphs/include/s_graphs/visualization/graph_publisher.hpp @@ -79,11 +79,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #include #include "geometry_msgs/msg/point.hpp" -#include "reasoning_msgs/msg/attribute.hpp" -#include "reasoning_msgs/msg/edge.hpp" -#include "reasoning_msgs/msg/graph.hpp" -#include "reasoning_msgs/msg/graph_keyframes.hpp" -#include "reasoning_msgs/msg/node.hpp" +#include "situational_graphs_reasoning_msgs/msg/attribute.hpp" +#include "situational_graphs_reasoning_msgs/msg/edge.hpp" +#include "situational_graphs_reasoning_msgs/msg/graph.hpp" +#include "situational_graphs_reasoning_msgs/msg/graph_keyframes.hpp" +#include "situational_graphs_reasoning_msgs/msg/node.hpp" #include "pcl_ros/transforms.hpp" #include "rclcpp/rclcpp.hpp" #include "s_graphs/common/room_utils.hpp" @@ -101,7 +101,7 @@ class GraphPublisher { ~GraphPublisher(); public: - reasoning_msgs::msg::Graph publish_graph( + situational_graphs_reasoning_msgs::msg::Graph publish_graph( const g2o::SparseOptimizer* local_graph, std::string graph_type, const std::vector& x_vert_planes_prior, @@ -113,7 +113,7 @@ class GraphPublisher { const std::vector& x_infinite_rooms, const std::vector& y_infinite_rooms); - reasoning_msgs::msg::GraphKeyframes publish_graph_keyframes( + situational_graphs_reasoning_msgs::msg::GraphKeyframes publish_graph_keyframes( const g2o::SparseOptimizer* local_graph, const std::vector& keyframes); diff --git a/s_graphs/launch/s_graphs_launch.py b/s_graphs/launch/s_graphs_launch.py index 303285e..eec0238 100644 --- a/s_graphs/launch/s_graphs_launch.py +++ b/s_graphs/launch/s_graphs_launch.py @@ -37,8 +37,8 @@ def generate_launch_description(): ) def launch_reasoning(): - reasoning_dir = get_package_share_directory('graph_reasoning') - reasoning_launch_file = os.path.join(reasoning_dir, "launch", "graph_reasoning.launch.py") + reasoning_dir = get_package_share_directory('situational_graphs_reasoning') + reasoning_launch_file = os.path.join(reasoning_dir, "launch", "situational_graphs_reasoning.launch.py") reasoning_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource(reasoning_launch_file)) diff --git a/s_graphs/package.xml b/s_graphs/package.xml index 3f4a634..583cf27 100644 --- a/s_graphs/package.xml +++ b/s_graphs/package.xml @@ -33,7 +33,7 @@ libceres-dev graph_reasoning s_graphs_msgs - reasoning_msgs + situational_graphs_reasoning_msgs ament_cmake_gtest diff --git a/s_graphs/src/s_graphs/common/room_utils.cpp b/s_graphs/src/s_graphs/common/room_utils.cpp index a0e9d21..eabd1b2 100644 --- a/s_graphs/src/s_graphs/common/room_utils.cpp +++ b/s_graphs/src/s_graphs/common/room_utils.cpp @@ -283,9 +283,9 @@ bool is_keyframe_inside_room( return false; } -reasoning_msgs::msg::RoomKeyframe convertExtendedRoomToRosMsg( +situational_graphs_reasoning_msgs::msg::RoomKeyframe convertExtendedRoomToRosMsg( const ExtendedRooms& room) { - reasoning_msgs::msg::RoomKeyframe msg; + situational_graphs_reasoning_msgs::msg::RoomKeyframe msg; msg.header.frame_id = "room"; msg.id = room.id; pcl::toROSMsg(*room.cloud, msg.pointcloud); @@ -302,7 +302,7 @@ reasoning_msgs::msg::RoomKeyframe convertExtendedRoomToRosMsg( } ExtendedRooms obtainExtendedRoomFromRosMsg( - const reasoning_msgs::msg::RoomKeyframe& msg) { + const situational_graphs_reasoning_msgs::msg::RoomKeyframe& msg) { ExtendedRooms room; room.id = msg.id; pcl::fromROSMsg(msg.pointcloud, *room.cloud); diff --git a/s_graphs/src/s_graphs/common/ros_utils.cpp b/s_graphs/src/s_graphs/common/ros_utils.cpp index 150f022..cd25038 100644 --- a/s_graphs/src/s_graphs/common/ros_utils.cpp +++ b/s_graphs/src/s_graphs/common/ros_utils.cpp @@ -146,7 +146,7 @@ Eigen::Isometry3d odom2isometry(const nav_msgs::msg::Odometry::SharedPtr& odom_m return isometry; } -KeyFrame ROS2Keyframe(const reasoning_msgs::msg::Keyframe& msg) { +KeyFrame ROS2Keyframe(const situational_graphs_reasoning_msgs::msg::Keyframe& msg) { pcl::PointCloud::Ptr cloud = pcl::PointCloud::Ptr(); pcl::fromROSMsg(msg.pointcloud, *cloud); @@ -160,9 +160,9 @@ KeyFrame ROS2Keyframe(const reasoning_msgs::msg::Keyframe& msg) { return keyframe; } -reasoning_msgs::msg::Keyframe Keyframe2ROS(const KeyFrame& keyframe) { +situational_graphs_reasoning_msgs::msg::Keyframe Keyframe2ROS(const KeyFrame& keyframe) { // TODO: add_accumulated_distance - reasoning_msgs::msg::Keyframe msg; + situational_graphs_reasoning_msgs::msg::Keyframe msg; msg.id = keyframe.id(); msg.header.stamp = keyframe.stamp; msg.pose = isometry2pose(keyframe.estimate()); diff --git a/s_graphs/src/s_graphs/visualization/graph_publisher.cpp b/s_graphs/src/s_graphs/visualization/graph_publisher.cpp index f7465a3..cdff314 100644 --- a/s_graphs/src/s_graphs/visualization/graph_publisher.cpp +++ b/s_graphs/src/s_graphs/visualization/graph_publisher.cpp @@ -9,7 +9,7 @@ GraphPublisher::GraphPublisher() {} GraphPublisher::~GraphPublisher() {} -reasoning_msgs::msg::Graph GraphPublisher::publish_graph( +situational_graphs_reasoning_msgs::msg::Graph GraphPublisher::publish_graph( const g2o::SparseOptimizer* local_graph, std::string graph_type, const std::vector& x_vert_planes_prior, @@ -20,19 +20,19 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( const std::vector& rooms_vec, const std::vector& x_infinite_rooms, const std::vector& y_infinite_rooms) { - std::vector edges_vec; - std::vector nodes_vec; - reasoning_msgs::msg::Graph graph_msg; - std::vector edge_att_vec; - std::vector node_att_vec; + std::vector edges_vec; + std::vector nodes_vec; + situational_graphs_reasoning_msgs::msg::Graph graph_msg; + std::vector edge_att_vec; + std::vector node_att_vec; // Graph Type if (graph_type == "Prior") { graph_msg.name = "Prior"; for (int i = 0; i < x_vert_planes_prior.size(); i++) { g2o::Plane3D v_plane = x_vert_planes_prior[i].plane; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = x_vert_planes_prior[i].id; graph_node.type = "Plane"; node_attribute.name = "Geometric_info"; @@ -49,8 +49,8 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( } for (int i = 0; i < y_vert_planes_prior.size(); i++) { g2o::Plane3D v_plane = y_vert_planes_prior[i].plane; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = y_vert_planes_prior[i].id; graph_node.type = "Plane"; node_attribute.name = "Geometric_info"; @@ -67,10 +67,10 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( } for (int i = 0; i < rooms_vec_prior.size(); i++) { g2o::VertexRoom* v_room = rooms_vec_prior[i].node; - reasoning_msgs::msg::Edge graph_edge; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute edge_attribute; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Edge graph_edge; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute edge_attribute; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = rooms_vec_prior[i].id; graph_node.type = "Finite Room"; node_attribute.name = "Geometric_info"; @@ -121,8 +121,8 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( graph_msg.name = "ONLINE"; for (int i = 0; i < x_vert_planes.size(); i++) { g2o::Plane3D v_plane = x_vert_planes[i].plane; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = x_vert_planes[i].id; graph_node.type = "Plane"; node_attribute.name = "Geometric_info"; @@ -139,8 +139,8 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( } for (int i = 0; i < y_vert_planes.size(); i++) { g2o::Plane3D v_plane = y_vert_planes[i].plane; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = y_vert_planes[i].id; graph_node.type = "Plane"; node_attribute.name = "Geometric_info"; @@ -157,10 +157,10 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( } for (int i = 0; i < rooms_vec.size(); i++) { g2o::VertexRoom* v_room = rooms_vec[i].node; - reasoning_msgs::msg::Edge graph_edge; - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute edge_attribute; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Edge graph_edge; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute edge_attribute; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; graph_node.id = rooms_vec[i].id; graph_node.type = "Finite Room"; node_attribute.name = "Geometric_info"; @@ -209,10 +209,10 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( // for(int i = 0; i < x_infinite_rooms.size(); i++) { // g2o::VertexRoom* v_room = x_infinite_rooms[i].node; - // reasoning_msgs::msg::Edge graph_edge; - // reasoning_msgs::msg::Node graph_node; - // reasoning_msgs::msg::Attribute edge_attribute; - // reasoning_msgs::msg::Attribute node_attribute; + // situational_graphs_reasoning_msgs::msg::Edge graph_edge; + // situational_graphs_reasoning_msgs::msg::Node graph_node; + // situational_graphs_reasoning_msgs::msg::Attribute edge_attribute; + // situational_graphs_reasoning_msgs::msg::Attribute node_attribute; // // X Infinte Room Node // graph_node.id = x_infinite_rooms[i].id; @@ -248,10 +248,10 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( // for(int i = 0; i < y_infinite_rooms.size(); i++) { // g2o::VertexRoom* v_room = y_infinite_rooms[i].node; - // reasoning_msgs::msg::Edge graph_edge; - // reasoning_msgs::msg::Node graph_node; - // reasoning_msgs::msg::Attribute edge_attribute; - // reasoning_msgs::msg::Attribute node_attribute; + // situational_graphs_reasoning_msgs::msg::Edge graph_edge; + // situational_graphs_reasoning_msgs::msg::Node graph_node; + // situational_graphs_reasoning_msgs::msg::Attribute edge_attribute; + // situational_graphs_reasoning_msgs::msg::Attribute node_attribute; // // Y Infinte Room Node // graph_node.id = y_infinite_rooms[i].id; @@ -294,8 +294,8 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( g2o::EdgeSE3Plane* edge_plane = dynamic_cast(edge); if (edge_2p) { - reasoning_msgs::msg::Node graph_node; - reasoning_msgs::msg::Attribute node_attribute; + situational_graphs_reasoning_msgs::msg::Node graph_node; + situational_graphs_reasoning_msgs::msg::Attribute node_attribute; g2o::VertexPlane* v_plane1 = dynamic_cast(edge_2p->vertices()[0]); g2o::VertexPlane* v_plane2 = @@ -304,7 +304,7 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( auto found_vertex1 = std::find_if( nodes_vec.begin(), nodes_vec.end(), - boost::bind(&reasoning_msgs::msg::Node::id, _1) == v_plane1->id()); + boost::bind(&situational_graphs_reasoning_msgs::msg::Node::id, _1) == v_plane1->id()); if (found_vertex1 == nodes_vec.end()) { graph_node.id = v_plane1->id(); graph_node.type = "Plane"; @@ -323,7 +323,7 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( auto found_vertex2 = std::find_if( nodes_vec.begin(), nodes_vec.end(), - boost::bind(&reasoning_msgs::msg::Node::id, _1) == v_plane2->id()); + boost::bind(&situational_graphs_reasoning_msgs::msg::Node::id, _1) == v_plane2->id()); if (found_vertex2 == nodes_vec.end()) { graph_node.id = v_plane2->id(); graph_node.type = "Plane"; @@ -349,10 +349,10 @@ reasoning_msgs::msg::Graph GraphPublisher::publish_graph( return graph_msg; } -reasoning_msgs::msg::GraphKeyframes GraphPublisher::publish_graph_keyframes( +situational_graphs_reasoning_msgs::msg::GraphKeyframes GraphPublisher::publish_graph_keyframes( const g2o::SparseOptimizer* local_graph, const std::vector& keyframes) { - reasoning_msgs::msg::GraphKeyframes msg; + situational_graphs_reasoning_msgs::msg::GraphKeyframes msg; msg.keyframes.reserve(keyframes.size()); for (auto& keyframe : keyframes) { msg.keyframes.emplace_back(s_graphs::Keyframe2ROS(*keyframe)); From 4c80e335869bce1e73b66eb2c2648191986094ae Mon Sep 17 00:00:00 2001 From: JoseAndresMR Date: Fri, 10 May 2024 09:44:22 +0200 Subject: [PATCH 2/8] [refact] remove matching repo from .rosinstall_ros2 --- .rosinstall_ros2 | 6 +----- utils/msgs/reasoning_msgs | 2 +- utils/reasoning/graph_datasets | 2 +- utils/reasoning/graph_reasoning | 2 +- utils/reasoning/graph_wrapper | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.rosinstall_ros2 b/.rosinstall_ros2 index c0d24ae..d1df470 100644 --- a/.rosinstall_ros2 +++ b/.rosinstall_ros2 @@ -11,10 +11,6 @@ repositories: type: git url: https://github.com/snt-arg/situational_graphs_reasoning.git version: complete_gnn_architecture - s_graphs_utils/reasoning/situational_graphs_wrapper: - type: git - url: https://github.com/snt-arg/situational_graphs_wrapper.git - version: develop s_graphs_utils/reasoning/situational_graphs_datasets: type: git url: https://github.com/snt-arg/situational_graphs_datasets.git @@ -26,4 +22,4 @@ repositories: s_graphs_utils/msgs/s_graphs_msgs: type: git url: https://github.com/snt-arg/s_graphs_msgs.git - version: main \ No newline at end of file + version: main diff --git a/utils/msgs/reasoning_msgs b/utils/msgs/reasoning_msgs index 294e482..5936335 160000 --- a/utils/msgs/reasoning_msgs +++ b/utils/msgs/reasoning_msgs @@ -1 +1 @@ -Subproject commit 294e4821fa63e44305befc921c21dcfa46bc3aaf +Subproject commit 593633537a612ff7cc50171a312ef52f92ae9f90 diff --git a/utils/reasoning/graph_datasets b/utils/reasoning/graph_datasets index 885b7de..04df79e 160000 --- a/utils/reasoning/graph_datasets +++ b/utils/reasoning/graph_datasets @@ -1 +1 @@ -Subproject commit 885b7de557a6651c6a22d5a8e3024b428499e442 +Subproject commit 04df79e4b0a13f1fd2e2521f70dc0cbe18a7b8f0 diff --git a/utils/reasoning/graph_reasoning b/utils/reasoning/graph_reasoning index b5d9ed5..2ec560f 160000 --- a/utils/reasoning/graph_reasoning +++ b/utils/reasoning/graph_reasoning @@ -1 +1 @@ -Subproject commit b5d9ed55f63341005a9e2d9c69f2529b882b2fb2 +Subproject commit 2ec560f130449ea4f0e1cacaacb9a22d6da92fee diff --git a/utils/reasoning/graph_wrapper b/utils/reasoning/graph_wrapper index 2373d1b..22efa07 160000 --- a/utils/reasoning/graph_wrapper +++ b/utils/reasoning/graph_wrapper @@ -1 +1 @@ -Subproject commit 2373d1b7858615930451bfacf28598de44ead68f +Subproject commit 22efa07230e0f835ce7eae8bbbfd8c8347e4d96f From a5c1740dd72ed6ceb5cc76680a5a14c5efc71266 Mon Sep 17 00:00:00 2001 From: JoseAndresMR Date: Fri, 10 May 2024 09:49:33 +0200 Subject: [PATCH 3/8] [fix] add sleep to rosbag in .virtual_mprocs.yaml --- .virtual_mprocs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.virtual_mprocs.yaml b/.virtual_mprocs.yaml index 05e337c..5bd1689 100644 --- a/.virtual_mprocs.yaml +++ b/.virtual_mprocs.yaml @@ -1,10 +1,10 @@ procs: rosbag: - shell: 'bash -c "sleep 2 && source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/stugalux_oetrange_f2_3r.db3"' + shell: 'bash -c "sleep 1 && source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"' autostart: true stop: SIGINT s_graphs: - shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && source ~/workspaces/reasoning_ws/install/setup.bash && source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"' + shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"' autostart: true rviz: shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"' From 3fe0e2e190b318f83875d33258896a055381d700 Mon Sep 17 00:00:00 2001 From: Hriday Bavle Date: Fri, 10 May 2024 16:38:19 +0200 Subject: [PATCH 4/8] [Fix] Typo in .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index cf8afbc..07bd51e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,7 +19,7 @@ branch = develop [submodule "utils/reasoning/situational_graphs_datasets"] path = utils/reasoning/situational_graphs_datasets - url = https://github.com/snt-argsituational_graphs_datasets.git + url = https://github.com/snt-arg/situational_graphs_datasets.git branch = develop [submodule "utils/msgs/situational_graphs_reasoning_msgs"] path = utils/msgs/reasoning_msgs From 619723ee9e98ba1bee005e569a10f6778b1d9fef Mon Sep 17 00:00:00 2001 From: Hriday Bavle Date: Fri, 10 May 2024 17:04:15 +0200 Subject: [PATCH 5/8] [Fix] Remove reasoning related repos --- .gitmodules | 18 +----------------- utils/msgs/reasoning_msgs | 1 - utils/reasoning/graph_datasets | 1 - utils/reasoning/graph_matching | 1 - utils/reasoning/graph_reasoning | 1 - utils/reasoning/graph_wrapper | 1 - 6 files changed, 1 insertion(+), 22 deletions(-) delete mode 160000 utils/msgs/reasoning_msgs delete mode 160000 utils/reasoning/graph_datasets delete mode 160000 utils/reasoning/graph_matching delete mode 160000 utils/reasoning/graph_reasoning delete mode 160000 utils/reasoning/graph_wrapper diff --git a/.gitmodules b/.gitmodules index 07bd51e..2a0e6ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,23 +9,7 @@ path = utils/ndt_omp url = https://github.com/koide3/ndt_omp.git branch = master -[submodule "utils/reasoning/situational_graphs_reasoning"] - path = utils/reasoning/situational_graphs_reasoning - url = https://github.com/snt-arg/situational_graphs_reasoning.git - branch = develop -[submodule "utils/reasoning/situational_graphs_wrapper"] - path = utils/reasoning/situational_graphs_wrapper - url = https://github.com/snt-arg/situational_graphs_wrapper.git - branch = develop -[submodule "utils/reasoning/situational_graphs_datasets"] - path = utils/reasoning/situational_graphs_datasets - url = https://github.com/snt-arg/situational_graphs_datasets.git - branch = develop -[submodule "utils/msgs/situational_graphs_reasoning_msgs"] - path = utils/msgs/reasoning_msgs - url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git - branch = main [submodule "utils/msgs/s_graphs_msgs"] path = utils/msgs/s_graphs_msgs url = https://github.com/snt-arg/s_graphs_msgs.git - branch = main + branch = main \ No newline at end of file diff --git a/utils/msgs/reasoning_msgs b/utils/msgs/reasoning_msgs deleted file mode 160000 index 5936335..0000000 --- a/utils/msgs/reasoning_msgs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 593633537a612ff7cc50171a312ef52f92ae9f90 diff --git a/utils/reasoning/graph_datasets b/utils/reasoning/graph_datasets deleted file mode 160000 index 04df79e..0000000 --- a/utils/reasoning/graph_datasets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04df79e4b0a13f1fd2e2521f70dc0cbe18a7b8f0 diff --git a/utils/reasoning/graph_matching b/utils/reasoning/graph_matching deleted file mode 160000 index d997284..0000000 --- a/utils/reasoning/graph_matching +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d99728475ea54ef1fdb3cdc2c4464e07a96ab0f8 diff --git a/utils/reasoning/graph_reasoning b/utils/reasoning/graph_reasoning deleted file mode 160000 index 2ec560f..0000000 --- a/utils/reasoning/graph_reasoning +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ec560f130449ea4f0e1cacaacb9a22d6da92fee diff --git a/utils/reasoning/graph_wrapper b/utils/reasoning/graph_wrapper deleted file mode 160000 index 22efa07..0000000 --- a/utils/reasoning/graph_wrapper +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 22efa07230e0f835ce7eae8bbbfd8c8347e4d96f From 44224b49c54a610904012c723deae50bdf85d7b5 Mon Sep 17 00:00:00 2001 From: Hriday Bavle Date: Fri, 10 May 2024 17:12:28 +0200 Subject: [PATCH 6/8] [Fix] re-add reasoning related repos --- .gitmodules | 16 ++++++++++++++++ utils/reasoning/situational_graphs_datasets | 1 + utils/reasoning/situational_graphs_reasoning | 1 + utils/reasoning/situational_graphs_wrapper | 1 + 4 files changed, 19 insertions(+) create mode 160000 utils/reasoning/situational_graphs_datasets create mode 160000 utils/reasoning/situational_graphs_reasoning create mode 160000 utils/reasoning/situational_graphs_wrapper diff --git a/.gitmodules b/.gitmodules index 2a0e6ca..0f49c47 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,4 +12,20 @@ [submodule "utils/msgs/s_graphs_msgs"] path = utils/msgs/s_graphs_msgs url = https://github.com/snt-arg/s_graphs_msgs.git + branch = main +[submodule "utils/reasoning/situational_graphs_reasoning"] + path = utils/reasoning/situational_graphs_reasoning + url = https://github.com/snt-arg/situational_graphs_reasoning.git + branch = develop +[submodule "utils/reasoning/situational_graphs_wrapper"] + path = utils/reasoning/situational_graphs_wrapper + url = https://github.com/snt-arg/situational_graphs_wrapper.git + branch = develop +[submodule "utils/reasoning/situational_graphs_datasets"] + path = utils/reasoning/situational_graphs_datasets + url = https://github.com/snt-arg/situational_graphs_datasets.git + branch = develop +[submodule "utils/msgs/situational_graphs_reasoning_msgs"] + path = utils/msgs/reasoning_msgs + url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git branch = main \ No newline at end of file diff --git a/utils/reasoning/situational_graphs_datasets b/utils/reasoning/situational_graphs_datasets new file mode 160000 index 0000000..fd6d2da --- /dev/null +++ b/utils/reasoning/situational_graphs_datasets @@ -0,0 +1 @@ +Subproject commit fd6d2dafd4ebf6110295a676328d71afc21e89dc diff --git a/utils/reasoning/situational_graphs_reasoning b/utils/reasoning/situational_graphs_reasoning new file mode 160000 index 0000000..04024f4 --- /dev/null +++ b/utils/reasoning/situational_graphs_reasoning @@ -0,0 +1 @@ +Subproject commit 04024f42377de80c639917542b1454a9f21f89fe diff --git a/utils/reasoning/situational_graphs_wrapper b/utils/reasoning/situational_graphs_wrapper new file mode 160000 index 0000000..14563cc --- /dev/null +++ b/utils/reasoning/situational_graphs_wrapper @@ -0,0 +1 @@ +Subproject commit 14563ccbbdd3ea67a3a51fef3859c85f15adb6bc From 8789242aa8156ec38f6a47018a26c88c95235aca Mon Sep 17 00:00:00 2001 From: Hriday Bavle Date: Fri, 10 May 2024 17:19:58 +0200 Subject: [PATCH 7/8] [Fix] Re-add reasoning_msgs --- .gitmodules | 4 ++-- utils/msgs/situational_graphs_reasoning_msgs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 160000 utils/msgs/situational_graphs_reasoning_msgs diff --git a/.gitmodules b/.gitmodules index 0f49c47..4dae240 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,6 +26,6 @@ url = https://github.com/snt-arg/situational_graphs_datasets.git branch = develop [submodule "utils/msgs/situational_graphs_reasoning_msgs"] - path = utils/msgs/reasoning_msgs + path = utils/msgs/situational_graphs_reasoning_msgs url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git - branch = main \ No newline at end of file + branch = main diff --git a/utils/msgs/situational_graphs_reasoning_msgs b/utils/msgs/situational_graphs_reasoning_msgs new file mode 160000 index 0000000..6ff2493 --- /dev/null +++ b/utils/msgs/situational_graphs_reasoning_msgs @@ -0,0 +1 @@ +Subproject commit 6ff24931de6e9eb549bd306a13506befe7cc2cc0 From 70c44bdba10d32f7a50cf9898d40b43ef1e462f9 Mon Sep 17 00:00:00 2001 From: Hriday Bavle Date: Fri, 10 May 2024 17:20:57 +0200 Subject: [PATCH 8/8] [Fix] Rename reasoning repo in package.xml --- s_graphs/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s_graphs/package.xml b/s_graphs/package.xml index 583cf27..daa0883 100644 --- a/s_graphs/package.xml +++ b/s_graphs/package.xml @@ -31,8 +31,8 @@ backward_ros rviz_visual_tools libceres-dev - graph_reasoning s_graphs_msgs + situational_graphs_reasoning situational_graphs_reasoning_msgs ament_cmake_gtest