-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Publish pose with covariance in localization mode. (#511) * Visualize localization nodes and edges with different colors in the pose graph marker message. (#513) * Fix edge marker id to not conflict with the localization edge marker. (#515) * Stop ceres problem from freeing loss function (#519) * Add map_and_localization node that supports toggling between mapping and localization modes with a service. (#512) * resolve API change from galactic (#524) * Fix segfault after loading posegraph (#527) * Assign mapper to closure_assistant after loading posgraph * Fix linting * Midigate spamming for 50Hz lidar (#526) * Increase scan filter queue_size * Add scan_queue_size as parameter Co-authored-by: Marc Alban <[email protected]> Co-authored-by: john-maidbot <[email protected]> Co-authored-by: Samuel Lindgren <[email protected]>
- Loading branch information
1 parent
ae68b85
commit c2541aa
Showing
14 changed files
with
416 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
include/slam_toolbox/experimental/slam_toolbox_map_and_localization.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* slam_toolbox | ||
* Copyright (c) 2022, Steve Macenski | ||
* | ||
* THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE | ||
* COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY | ||
* COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS | ||
* AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. | ||
* | ||
* BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO | ||
* BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS | ||
* CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND | ||
* CONDITIONS. | ||
* | ||
*/ | ||
|
||
#ifndef SLAM_TOOLBOX__SLAM_TOOLBOX_MAP_AND_LOCALIZATION_HPP_ | ||
#define SLAM_TOOLBOX__SLAM_TOOLBOX_MAP_AND_LOCALIZATION_HPP_ | ||
|
||
#include <memory> | ||
#include "slam_toolbox/slam_toolbox_localization.hpp" | ||
#include "std_srvs/srv/set_bool.hpp" | ||
|
||
namespace slam_toolbox | ||
{ | ||
|
||
class MapAndLocalizationSlamToolbox : public LocalizationSlamToolbox | ||
{ | ||
public: | ||
explicit MapAndLocalizationSlamToolbox(rclcpp::NodeOptions options); | ||
virtual ~MapAndLocalizationSlamToolbox() {} | ||
void loadPoseGraphByParams() override; | ||
void configure() override; | ||
|
||
protected: | ||
void laserCallback( | ||
sensor_msgs::msg::LaserScan::ConstSharedPtr scan) override; | ||
bool serializePoseGraphCallback( | ||
const std::shared_ptr<rmw_request_id_t> request_header, | ||
const std::shared_ptr<slam_toolbox::srv::SerializePoseGraph::Request> req, | ||
std::shared_ptr<slam_toolbox::srv::SerializePoseGraph::Response> resp) override; | ||
bool deserializePoseGraphCallback( | ||
const std::shared_ptr<rmw_request_id_t> request_header, | ||
const std::shared_ptr<slam_toolbox::srv::DeserializePoseGraph::Request> req, | ||
std::shared_ptr<slam_toolbox::srv::DeserializePoseGraph::Response> resp) override; | ||
bool setLocalizationModeCallback( | ||
const std::shared_ptr<rmw_request_id_t> request_header, | ||
const std::shared_ptr<std_srvs::srv::SetBool::Request> req, | ||
std::shared_ptr<std_srvs::srv::SetBool::Response> resp); | ||
LocalizedRangeScan * addScan( | ||
LaserRangeFinder * laser, | ||
const sensor_msgs::msg::LaserScan::ConstSharedPtr & scan, | ||
Pose2 & pose) override; | ||
void toggleMode(bool enable_localization); | ||
|
||
std::shared_ptr<rclcpp::Service<std_srvs::srv::SetBool>> ssSetLocalizationMode_; | ||
}; | ||
|
||
} // namespace slam_toolbox | ||
|
||
#endif // SLAM_TOOLBOX__SLAM_TOOLBOX_MAP_AND_LOCALIZATION_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.