loop_closure_assistant.hpp
Go to the documentation of this file.
1 /*
2  * loop_closure_assistant
3  * Copyright (c) 2019, Samsung Research America
4  *
5  * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
6  * COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
7  * COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
8  * AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
9  *
10  * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
11  * BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS
12  * CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
13  * CONDITIONS.
14  *
15  */
16 
17 /* Author: Steven Macenski */
18 
19 #ifndef SLAM_TOOLBOX_LOOP_CLOSURE_ASSISTANT_H_
20 #define SLAM_TOOLBOX_LOOP_CLOSURE_ASSISTANT_H_
21 
22 #include <functional>
23 #include <boost/thread.hpp>
24 #include <map>
25 
26 #include "ros/ros.h"
30 #include "tf2/utils.h"
31 
32 #include "karto_sdk/Mapper.h"
36 
38 {
39 
40 using namespace ::toolbox_types;
41 
43 {
44 public:
45  LoopClosureAssistant(ros::NodeHandle& node, karto::Mapper* mapper, laser_utils::ScanHolder* scan_holder, PausedState& state, ProcessType& processor_type);
46 
47  void clearMovedNodes();
48  void processInteractiveFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
49  void publishGraph();
50  void setMapper(karto::Mapper * mapper);
51 
52 private:
53  bool manualLoopClosureCallback(slam_toolbox_msgs::LoopClosure::Request& req, slam_toolbox_msgs::LoopClosure::Response& resp);
54  bool clearChangesCallback(slam_toolbox_msgs::Clear::Request& req, slam_toolbox_msgs::Clear::Response& resp);
55  bool interactiveModeCallback(slam_toolbox_msgs::ToggleInteractive::Request &req, slam_toolbox_msgs::ToggleInteractive::Response &resp);
56  void moveNode(const int& id, const Eigen::Vector3d& pose);
57  void addMovedNodes(const int& id, Eigen::Vector3d vec);
58 
59  std::unique_ptr<tf2_ros::TransformBroadcaster> tfB_;
63  boost::mutex moved_nodes_mutex_;
64  std::map<int, Eigen::Vector3d> moved_nodes_;
67  std::unique_ptr<interactive_markers::InteractiveMarkerServer> interactive_server_;
68  visualization_msgs::MarkerArray marker_array_;
69  boost::mutex interactive_mutex_;
72  std::string map_frame_;
73  PausedState& state_;
75 };
76 
77 } // end namespace
78 
79 #endif //SLAM_TOOLBOX_LOOP_CLOSURE_ASSISTANT_H_
karto::Mapper
Definition: Mapper.h:1928
karto::ScanSolver
Definition: Mapper.h:947
loop_closure_assistant::LoopClosureAssistant::publishGraph
void publishGraph()
Definition: loop_closure_assistant.cpp:131
toolbox_types
Definition: toolbox_types.hpp:36
loop_closure_assistant::LoopClosureAssistant::mapper_
karto::Mapper * mapper_
Definition: loop_closure_assistant.hpp:65
loop_closure_assistant::LoopClosureAssistant::enable_interactive_mode_
bool enable_interactive_mode_
Definition: loop_closure_assistant.hpp:70
ros::Publisher
utils.h
ros.h
loop_closure_assistant::LoopClosureAssistant::moved_nodes_mutex_
boost::mutex moved_nodes_mutex_
Definition: loop_closure_assistant.hpp:63
loop_closure_assistant::LoopClosureAssistant::scan_holder_
laser_utils::ScanHolder * scan_holder_
Definition: loop_closure_assistant.hpp:60
loop_closure_assistant::LoopClosureAssistant::setMapper
void setMapper(karto::Mapper *mapper)
Definition: loop_closure_assistant.cpp:57
menu_handler.h
loop_closure_assistant::LoopClosureAssistant::marker_array_
visualization_msgs::MarkerArray marker_array_
Definition: loop_closure_assistant.hpp:68
laser_utils::ScanHolder
Definition: laser_utils.hpp:91
loop_closure_assistant::LoopClosureAssistant::moveNode
void moveNode(const int &id, const Eigen::Vector3d &pose)
Definition: loop_closure_assistant.cpp:322
loop_closure_assistant::LoopClosureAssistant::marker_publisher_
ros::Publisher marker_publisher_
Definition: loop_closure_assistant.hpp:61
visualization_utils.hpp
transform_broadcaster.h
loop_closure_assistant::LoopClosureAssistant::scan_publisher_
ros::Publisher scan_publisher_
Definition: loop_closure_assistant.hpp:61
ros::ServiceServer
loop_closure_assistant::LoopClosureAssistant::LoopClosureAssistant
LoopClosureAssistant(ros::NodeHandle &node, karto::Mapper *mapper, laser_utils::ScanHolder *scan_holder, PausedState &state, ProcessType &processor_type)
Definition: loop_closure_assistant.cpp:25
loop_closure_assistant::LoopClosureAssistant::ssLoopClosure_
ros::ServiceServer ssLoopClosure_
Definition: loop_closure_assistant.hpp:62
loop_closure_assistant::LoopClosureAssistant::tfB_
std::unique_ptr< tf2_ros::TransformBroadcaster > tfB_
Definition: loop_closure_assistant.hpp:59
loop_closure_assistant::LoopClosureAssistant::nh_
ros::NodeHandle & nh_
Definition: loop_closure_assistant.hpp:71
loop_closure_assistant::LoopClosureAssistant::clearMovedNodes
void clearMovedNodes()
Definition: loop_closure_assistant.cpp:348
loop_closure_assistant::LoopClosureAssistant::interactiveModeCallback
bool interactiveModeCallback(slam_toolbox_msgs::ToggleInteractive::Request &req, slam_toolbox_msgs::ToggleInteractive::Response &resp)
Definition: loop_closure_assistant.cpp:289
loop_closure_assistant::LoopClosureAssistant::processor_type_
ProcessType & processor_type_
Definition: loop_closure_assistant.hpp:74
loop_closure_assistant::LoopClosureAssistant::interactive_mutex_
boost::mutex interactive_mutex_
Definition: loop_closure_assistant.hpp:69
loop_closure_assistant::LoopClosureAssistant::clearChangesCallback
bool clearChangesCallback(slam_toolbox_msgs::Clear::Request &req, slam_toolbox_msgs::Clear::Response &resp)
Definition: loop_closure_assistant.cpp:330
loop_closure_assistant::LoopClosureAssistant::addMovedNodes
void addMovedNodes(const int &id, Eigen::Vector3d vec)
Definition: loop_closure_assistant.cpp:356
loop_closure_assistant::LoopClosureAssistant::ssClear_manual_
ros::ServiceServer ssClear_manual_
Definition: loop_closure_assistant.hpp:62
loop_closure_assistant::LoopClosureAssistant::processInteractiveFeedback
void processInteractiveFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
Definition: loop_closure_assistant.cpp:64
toolbox_types.hpp
loop_closure_assistant::LoopClosureAssistant::map_frame_
std::string map_frame_
Definition: loop_closure_assistant.hpp:72
loop_closure_assistant::LoopClosureAssistant
Definition: loop_closure_assistant.hpp:42
interactive_marker_server.h
loop_closure_assistant::LoopClosureAssistant::interactive_server_
std::unique_ptr< interactive_markers::InteractiveMarkerServer > interactive_server_
Definition: loop_closure_assistant.hpp:67
loop_closure_assistant::LoopClosureAssistant::interactive_mode_
bool interactive_mode_
Definition: loop_closure_assistant.hpp:70
loop_closure_assistant::LoopClosureAssistant::manualLoopClosureCallback
bool manualLoopClosureCallback(slam_toolbox_msgs::LoopClosure::Request &req, slam_toolbox_msgs::LoopClosure::Response &resp)
Definition: loop_closure_assistant.cpp:247
loop_closure_assistant::LoopClosureAssistant::state_
PausedState & state_
Definition: loop_closure_assistant.hpp:73
Mapper.h
loop_closure_assistant
Definition: loop_closure_assistant.hpp:37
toolbox_types::ProcessType
ProcessType
Definition: toolbox_types.hpp:84
loop_closure_assistant::LoopClosureAssistant::moved_nodes_
std::map< int, Eigen::Vector3d > moved_nodes_
Definition: loop_closure_assistant.hpp:64
loop_closure_assistant::LoopClosureAssistant::solver_
karto::ScanSolver * solver_
Definition: loop_closure_assistant.hpp:66
laser_utils.hpp
ros::NodeHandle
loop_closure_assistant::LoopClosureAssistant::ssInteractive_
ros::ServiceServer ssInteractive_
Definition: loop_closure_assistant.hpp:62


slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:55