mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-11 14:00:20 +08:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
594498ddea | ||
|
|
4a37855526 | ||
|
|
db59344007 | ||
|
|
105ac3bf9e | ||
|
|
471ed6ade2 |
@@ -3,7 +3,7 @@ name: CMake-ROS
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- jazzy-devel
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
@@ -23,10 +23,16 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ros_distribution: [jazzy]
|
||||
ros_distribution: [ humble, jazzy, kilted, rolling ]
|
||||
include:
|
||||
- ros_distribution: 'humble'
|
||||
os: ubuntu-22.04
|
||||
- ros_distribution: 'jazzy'
|
||||
os: ubuntu-24.04
|
||||
- ros_distribution: 'kilted'
|
||||
os: ubuntu-24.04
|
||||
- ros_distribution: 'rolling'
|
||||
os: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Setup ROS2
|
||||
|
||||
+3
-3
@@ -1410,11 +1410,11 @@ MESSAGE(STATUS " With ORB OcTree = NO (WITH_ORB_OCTREE=OFF)")
|
||||
ENDIF()
|
||||
|
||||
IF(TORCH_FOUND)
|
||||
MESSAGE(STATUS " With SupertPoint = YES (License: GPLv3) libtorch=${Torch_VERSION}")
|
||||
MESSAGE(STATUS " With SuperPoint = YES (License: GPLv3) libtorch=${Torch_VERSION}")
|
||||
ELSEIF(NOT WITH_TORCH)
|
||||
MESSAGE(STATUS " With SupertPoint = NO (WITH_TORCH=OFF)")
|
||||
MESSAGE(STATUS " With SuperPoint = NO (WITH_TORCH=OFF)")
|
||||
ELSE()
|
||||
MESSAGE(STATUS " With SupertPoint = NO (libtorch not found)")
|
||||
MESSAGE(STATUS " With SuperPoint = NO (libtorch not found)")
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_PYTHON AND Python3_FOUND)
|
||||
|
||||
@@ -50,6 +50,7 @@ class BayesFilter;
|
||||
class Signature;
|
||||
class Optimizer;
|
||||
class PythonInterface;
|
||||
class DBDriver;
|
||||
|
||||
class RTABMAP_CORE_EXPORT Rtabmap
|
||||
{
|
||||
@@ -371,6 +372,7 @@ private:
|
||||
Transform _lastLocalizationPose; // Corrected odometry pose. In mapping mode, this corresponds to last pose return by getLocalOptimizedPoses().
|
||||
int _lastLocalizationNodeId; // for localization mode
|
||||
cv::Mat _localizationCovariance;
|
||||
DBDriver * _externalLocalizationDbDriver;
|
||||
std::map<int, std::pair<cv::Point3d, Transform> > _gpsGeocentricCache;
|
||||
bool _currentSessionHasGPS;
|
||||
LaserScan _globalScanMap;
|
||||
|
||||
@@ -688,7 +688,7 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
||||
#ifndef RTABMAP_TORCH
|
||||
if(type == Feature2D::kFeatureSuperPointTorch)
|
||||
{
|
||||
UWARN("SupertPoint Torch feature cannot be used as RTAB-Map is not built with the option enabled. GFTT/ORB is used instead.");
|
||||
UWARN("SuperPoint Torch feature cannot be used as RTAB-Map is not built with the option enabled. GFTT/ORB is used instead.");
|
||||
type = Feature2D::kFeatureGfttOrb;
|
||||
}
|
||||
#endif
|
||||
|
||||
+52
-2
@@ -423,6 +423,32 @@ void Rtabmap::init(const ParametersMap & parameters, const std::string & databas
|
||||
|
||||
if(_createGlobalScanMap)
|
||||
createGlobalScanMap();
|
||||
|
||||
if(true)
|
||||
{
|
||||
std::string externalLocalizationDataPath = _wDir +"/rtabmap_log.db"; // use parameter to know prefix, then generate timestamp
|
||||
_externalLocalizationDbDriver = DBDriver::create(allParameters);
|
||||
if(!_externalLocalizationDbDriver->openConnection(externalLocalizationDataPath)) {
|
||||
UERROR("Failed to create database \"%s\" to save external localization data!");
|
||||
}
|
||||
else
|
||||
{
|
||||
float x, y, resolution;
|
||||
cv::Mat map = _memory->load2DMap(x, y, resolution);
|
||||
if(!map.empty()) {
|
||||
_externalLocalizationDbDriver->save2DMap(map, x, y, resolution);
|
||||
}
|
||||
if(!_optimizedPoses.empty()) {
|
||||
_externalLocalizationDbDriver->saveOptimizedPoses(_optimizedPoses, _lastLocalizationPose);
|
||||
}
|
||||
if(!allParameters.empty())
|
||||
{
|
||||
ParametersMap params = allParameters;
|
||||
params.erase(Parameters::kRtabmapWorkingDirectory()); // don't save working directory as it is machine dependent
|
||||
_externalLocalizationDbDriver->addInfoAfterRun(0, 0, 0, 0, 0, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -519,6 +545,9 @@ void Rtabmap::close(bool databaseSaved, const std::string & ouputDatabasePath)
|
||||
_optimizedPoses.erase(iter->first);
|
||||
}
|
||||
}
|
||||
if(!_memory->isIncremental() && _externalLocalizationDbDriver) {
|
||||
_externalLocalizationDbDriver->saveOptimizedPoses(_optimizedPoses, _lastLocalizationPose);
|
||||
}
|
||||
_memory->saveOptimizedPoses(_optimizedPoses, _lastLocalizationPose);
|
||||
}
|
||||
_memory->close(databaseSaved, true, ouputDatabasePath);
|
||||
@@ -528,6 +557,12 @@ void Rtabmap::close(bool databaseSaved, const std::string & ouputDatabasePath)
|
||||
_optimizedPoses.clear();
|
||||
_lastLocalizationPose.setNull();
|
||||
|
||||
if(_externalLocalizationDbDriver) {
|
||||
_externalLocalizationDbDriver->closeConnection();
|
||||
delete _externalLocalizationDbDriver;
|
||||
_externalLocalizationDbDriver = 0;
|
||||
}
|
||||
|
||||
if(_bayesFilter)
|
||||
{
|
||||
delete _bayesFilter;
|
||||
@@ -4265,9 +4300,19 @@ bool Rtabmap::process(
|
||||
|
||||
// Localization mode and saving localization data: save odometry covariance in a prior link
|
||||
// so that DBReader can republish the covariance of localization data
|
||||
if(!_memory->isIncremental() && _memory->isLocalizationDataSaved() && !odomCovariance.empty())
|
||||
if(!_memory->isIncremental())
|
||||
{
|
||||
_memory->addLink(Link(signature->id(), signature->id(), Link::kPosePrior, odomPose, odomCovariance.inv()));
|
||||
if(_externalLocalizationDbDriver)
|
||||
{
|
||||
Signature * cpy = new Signature();
|
||||
*cpy = *signature;
|
||||
_externalLocalizationDbDriver->asyncSave(cpy);
|
||||
}
|
||||
|
||||
if(_memory->isLocalizationDataSaved() && !odomCovariance.empty())
|
||||
{
|
||||
_memory->addLink(Link(signature->id(), signature->id(), Link::kPosePrior, odomPose, odomCovariance.inv()));
|
||||
}
|
||||
}
|
||||
|
||||
// remove last signature if the memory is not incremental or is a bad signature (if bad signatures are ignored)
|
||||
@@ -4689,6 +4734,11 @@ bool Rtabmap::process(
|
||||
{
|
||||
_memory->saveStatistics(statistics_, _saveWMState);
|
||||
}
|
||||
|
||||
if(_externalLocalizationDbDriver) // external db log
|
||||
{
|
||||
_externalLocalizationDbDriver->addStatistics(statistics_, _saveWMState);
|
||||
}
|
||||
|
||||
//Start trashing
|
||||
UDEBUG("Empty trash...");
|
||||
|
||||
@@ -11,7 +11,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /root/
|
||||
|
||||
# issue: https://github.com/introlab/rtabmap/issues/1523
|
||||
RUN rm /etc/apt/sources.list.d/ros1-latest.list && \
|
||||
RUN rm /etc/apt/sources.list.d/ros1-latest.list || true && \
|
||||
apt-get update && apt-get install -y curl && \
|
||||
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && \
|
||||
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - && \
|
||||
@@ -155,7 +155,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then git clone https://github.com/
|
||||
cd AliceVision && \
|
||||
git checkout 0f6115b6af6183c524aa7fcf26141337c1cf3872 && \
|
||||
git submodule update -i && \
|
||||
wget https://gist.githubusercontent.com/matlabbe/1df724465106c056ca4cc195c81d8cf0/raw/b3ed4cb8f9b270833a40d57d870a259eabfa4415/alicevision_0f6115b.patch && \
|
||||
wget https://gist.githubusercontent.com/matlabbe/1df724465106c056ca4cc195c81d8cf0/raw/5e3437cf6229c8d534bbaee475ed9bcb92eb84a1/alicevision_0f6115b.patch && \
|
||||
git apply alicevision_0f6115b.patch && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
|
||||
@@ -80,6 +80,7 @@ public:
|
||||
void updateLocalPath(const std::vector<int> & localPath);
|
||||
void setGlobalPath(const std::vector<std::pair<int, Transform> > & globalPath);
|
||||
void setCurrentGoalID(int id, const Transform & pose = Transform());
|
||||
void setNodeInfo(int id, const QString & info);
|
||||
void setLocalRadius(float radius);
|
||||
void highlightNode(int nodeId, int highlightIndex);
|
||||
void clearGraph();
|
||||
|
||||
@@ -109,6 +109,10 @@ public:
|
||||
_value = value;
|
||||
}
|
||||
|
||||
void setToolTipInfo(const QString & info) {
|
||||
_info = info;
|
||||
}
|
||||
|
||||
void setRadius(float radius)
|
||||
{
|
||||
float r,p,yaw;
|
||||
@@ -160,6 +164,10 @@ protected:
|
||||
{
|
||||
msg += QString("\n%1=%2").arg(_valueName).arg(_value);
|
||||
}
|
||||
if(!_info.isEmpty())
|
||||
{
|
||||
msg += QString("\n%1").arg(_info);
|
||||
}
|
||||
|
||||
this->setToolTip(msg);
|
||||
|
||||
@@ -181,6 +189,7 @@ private:
|
||||
QGraphicsLineItem * _line;
|
||||
QString _valueName;
|
||||
float _value;
|
||||
QString _info;
|
||||
};
|
||||
|
||||
class NodeGPSItem: public NodeItem
|
||||
@@ -522,6 +531,7 @@ void GraphViewer::updateGraph(const std::map<int, Transform> & poses,
|
||||
}
|
||||
iter.value()->hide();
|
||||
iter.value()->setColor(color); // reset color
|
||||
iter.value()->setToolTipInfo(QString());
|
||||
iter.value()->setZValue(iter.key()<0?21:20);
|
||||
}
|
||||
for(QMultiMap<int, LinkItem*>::iterator iter = _linkItems.begin(); iter!=_linkItems.end(); ++iter)
|
||||
@@ -1166,6 +1176,19 @@ void GraphViewer::setCurrentGoalID(int id, const Transform & pose)
|
||||
}
|
||||
}
|
||||
|
||||
void GraphViewer::setNodeInfo(int id, const QString & info)
|
||||
{
|
||||
NodeItem * node = _nodeItems.value(id, 0);
|
||||
if(node)
|
||||
{
|
||||
node->setToolTipInfo(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UWARN("Current goal %d not found in the graph", id);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphViewer::setLocalRadius(float radius)
|
||||
{
|
||||
_localRadius->setRect(-radius*100, -radius*100, radius*200, radius*200);
|
||||
|
||||
@@ -27222,13 +27222,13 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_detector_superpoint_torch2">
|
||||
<property name="title">
|
||||
<string>SupertPoint Torch</string>
|
||||
<string>SuperPoint Torch</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_147">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_575">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>SupertPoint c++ implementation from <a href="https://github.com/KinglittleQ/SuperPoint_SLAM"><span style=" text-decoration: underline; color:#0000ff;">SuperPoint_SLAM</span></a> project based on pytorch. A <span style=" font-weight:600;">superpoint.pt</span> weights file can be downloaded from its Git. It should be the same weights file <a href="https://pytorch.org/tutorials/advanced/cpp_export.html"><span style=" text-decoration: underline; color:#0000ff;">converted</span></a> from <span style=" font-weight:600;">superpoint.pth</span> of the <a href="https://github.com/magicleap/SuperPointPretrainedNetwork"><span style=" text-decoration: underline; color:#0000ff;">SuperPointPretrainedNetwork</span></a> project.</p></body></html></string>
|
||||
<string><html><head/><body><p>SuperPoint c++ implementation from <a href="https://github.com/KinglittleQ/SuperPoint_SLAM"><span style=" text-decoration: underline; color:#0000ff;">SuperPoint_SLAM</span></a> project based on pytorch. A <span style=" font-weight:600;">superpoint.pt</span> weights file can be downloaded from its Git. It should be the same weights file <a href="https://pytorch.org/tutorials/advanced/cpp_export.html"><span style=" text-decoration: underline; color:#0000ff;">converted</span></a> from <span style=" font-weight:600;">superpoint.pth</span> of the <a href="https://github.com/magicleap/SuperPointPretrainedNetwork"><span style=" text-decoration: underline; color:#0000ff;">SuperPointPretrainedNetwork</span></a> project.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<depend>cv_bridge</depend>
|
||||
<depend>libg2o</depend>
|
||||
<depend>gtsam</depend>
|
||||
<depend>tbb</depend> <!-- till tbb is added to gtsam dependencies https://github.com/borglab/gtsam/issues/1759 -->
|
||||
<!-- <depend>libopenni2-dev</depend> --> <!-- not available on Jessie -->
|
||||
<depend>libpcl-all-dev</depend> <!-- include libvtk-qt -->
|
||||
<depend>libpointmatcher</depend> <!-- optional but recommended if lidar is used, also not available on 32 bits system, but rtabmap can be built without it -->
|
||||
|
||||
Reference in New Issue
Block a user