Skip to content

Commit

Permalink
Merge pull request #3 from snt-arg/refact/reasonin_repos_renaming
Browse files Browse the repository at this point in the history
Refact/reasonin repos renaming
  • Loading branch information
hridaybavle authored May 10, 2024
2 parents f2ffbf2 + 70c44bd commit 60c7941
Show file tree
Hide file tree
Showing 22 changed files with 97 additions and 110 deletions.
36 changes: 16 additions & 20 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,23 @@
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
branch = develop
[submodule "utils/reasoning/graph_wrapper"]
path = utils/reasoning/graph_wrapper
url = https://github.com/snt-arg/graph_wrapper.git
branch = develop
[submodule "utils/reasoning/graph_datasets"]
path = utils/reasoning/graph_datasets
url = https://github.com/snt-arg/graph_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"]
path = utils/msgs/reasoning_msgs
url = https://github.com/snt-arg/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
[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/situational_graphs_reasoning_msgs
url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git
branch = main
22 changes: 7 additions & 15 deletions .rosinstall_ros2
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,19 @@ 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_datasets:
type: git
url: https://github.com/snt-arg/graph_wrapper.git
version: develop
s_graphs_utils/reasoning/graph_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:
type: git
url: https://github.com/snt-arg/graph_matching.git
version: develop
s_graphs_utils/msgs/reasoning_msgs:
s_graphs_utils/msgs/situational_graphs_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
url: https://github.com/snt-arg/s_graphs_msgs.git
version: main
version: main
4 changes: 2 additions & 2 deletions .virtual_mprocs.yaml
Original file line number Diff line number Diff line change
@@ -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 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 && 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
autostart: true
4 changes: 2 additions & 2 deletions s_graphs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -92,7 +92,7 @@ set(DEPENDENCIES
tf2_ros
tf2_eigen
pcl_ros
reasoning_msgs
situational_graphs_reasoning_msgs
visualization_msgs
message_filters
geographic_msgs
Expand Down
4 changes: 2 additions & 2 deletions s_graphs/apps/s_graphs_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class SGraphsNode : public rclcpp::Node {
"s_graphs/all_map_planes", 1, pub_opt);
read_until_pub = this->create_publisher<std_msgs::msg::Header>(
"s_graphs/read_until", 32, pub_opt);
graph_pub = this->create_publisher<reasoning_msgs::msg::Graph>(
graph_pub = this->create_publisher<situational_graphs_reasoning_msgs::msg::Graph>(
"s_graphs/graph_structure", 32, pub_opt);

dump_service_server = this->create_service<s_graphs_msgs::srv::DumpGraph>(
Expand Down Expand Up @@ -1787,7 +1787,7 @@ class SGraphsNode : public rclcpp::Node {
rclcpp::Publisher<sensor_msgs::msg::PointCloud2>::SharedPtr map_points_pub;
rclcpp::Publisher<s_graphs_msgs::msg::PlanesData>::SharedPtr map_planes_pub;
rclcpp::Publisher<s_graphs_msgs::msg::PlanesData>::SharedPtr all_map_planes_pub;
rclcpp::Publisher<reasoning_msgs::msg::Graph>::SharedPtr graph_pub;
rclcpp::Publisher<situational_graphs_reasoning_msgs::msg::Graph>::SharedPtr graph_pub;

std::shared_ptr<tf2_ros::TransformListener> tf_listener{nullptr};
std::unique_ptr<tf2_ros::Buffer> tf_buffer;
Expand Down
16 changes: 8 additions & 8 deletions s_graphs/include/s_graphs/common/room_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#include <unordered_map>

#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"
Expand Down Expand Up @@ -318,10 +318,10 @@ class RoomsKeyframeGenerator : public s_graphs::Rooms {
const std::map<int, s_graphs::KeyFrame::Ptr>* 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
6 changes: 3 additions & 3 deletions s_graphs/include/s_graphs/common/ros_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -110,15 +110,15 @@ 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
*
* @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
14 changes: 7 additions & 7 deletions s_graphs/include/s_graphs/visualization/graph_publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#include <unordered_map>

#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"
Expand All @@ -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<s_graphs::VerticalPlanes>& x_vert_planes_prior,
Expand All @@ -113,7 +113,7 @@ class GraphPublisher {
const std::vector<s_graphs::InfiniteRooms>& x_infinite_rooms,
const std::vector<s_graphs::InfiniteRooms>& 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<s_graphs::KeyFrame::Ptr>& keyframes);

Expand Down
4 changes: 2 additions & 2 deletions s_graphs/launch/s_graphs_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 2 additions & 2 deletions s_graphs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<depend>backward_ros</depend>
<depend>rviz_visual_tools</depend>
<depend>libceres-dev</depend>
<depend>graph_reasoning</depend>
<depend>s_graphs_msgs</depend>
<depend>reasoning_msgs</depend>
<depend>situational_graphs_reasoning</depend>
<depend>situational_graphs_reasoning_msgs</depend>

<depend>ament_cmake_gtest</depend>

Expand Down
6 changes: 3 additions & 3 deletions s_graphs/src/s_graphs/common/room_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions s_graphs/src/s_graphs/common/ros_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<KeyFrame::PointT>::Ptr cloud =
pcl::PointCloud<KeyFrame::PointT>::Ptr();
pcl::fromROSMsg(msg.pointcloud, *cloud);
Expand All @@ -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());
Expand Down
Loading

0 comments on commit 60c7941

Please sign in to comment.