Skip to content

Commit b1b9771

Browse files
authored
Merge pull request #9 from SolarFramework/fix/mapping
Fix mapping & map update & bootstrap
2 parents 63da63f + e9271da commit b1b9771

6 files changed

+258
-24
lines changed

ILoopCorrector_grpcProxy.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ SolAR::FrameworkReturnCode ILoopCorrector_grpcProxy::correct(SRef<SolAR::datast
7575
}
7676

7777

78-
SolAR::FrameworkReturnCode ILoopCorrector_grpcProxy::correct(SRef<SolAR::datastructure::Keyframe> const queryKeyframe, SRef<SolAR::datastructure::Keyframe> const detectedLoopKeyframe, SolAR::datastructure::Transform3Df const& S_wl_wc, std::vector<std::pair<uint32_t,uint32_t>> const& duplicatedPointsIndices, std::vector<uint32_t>& correctedKeyframeIds)
78+
SolAR::FrameworkReturnCode ILoopCorrector_grpcProxy::correct(SRef<SolAR::datastructure::Keyframe> const queryKeyframe, SRef<SolAR::datastructure::Keyframe> const detectedLoopKeyframe, SolAR::datastructure::Transform3Df const& S_wl_wc, std::vector<std::pair<uint32_t,uint32_t>> const& duplicatedPointsIndices, std::vector<uint32_t>& correctedKeyframeIds, std::vector<uint32_t>& correctedCloudpointIds)
7979
{
8080
::grpc::ClientContext context;
8181
::grpcILoopCorrector::correct_grpc1Request reqIn;
@@ -90,6 +90,7 @@ SolAR::FrameworkReturnCode ILoopCorrector_grpcProxy::correct(SRef<SolAR::datast
9090
reqIn.set_s_wl_wc(xpcf::serialize<SolAR::datastructure::Transform3Df>(S_wl_wc));
9191
reqIn.set_duplicatedpointsindices(xpcf::serialize<std::vector<std::pair<uint32_t,uint32_t>>>(duplicatedPointsIndices));
9292
reqIn.set_correctedkeyframeids(xpcf::serialize<std::vector<uint32_t>>(correctedKeyframeIds));
93+
reqIn.set_correctedcloudpointids(xpcf::serialize<std::vector<uint32_t>>(correctedCloudpointIds));
9394
#ifdef ENABLE_PROXY_TIMERS
9495
boost::posix_time::ptime start = boost::posix_time::microsec_clock::universal_time();
9596
std::cout << "====> ILoopCorrector_grpcProxy::correct request sent at " << to_simple_string(start) << std::endl;
@@ -106,6 +107,7 @@ SolAR::FrameworkReturnCode ILoopCorrector_grpcProxy::correct(SRef<SolAR::datast
106107
}
107108

108109
correctedKeyframeIds = xpcf::deserialize<std::vector<uint32_t>>(respOut.correctedkeyframeids());
110+
correctedCloudpointIds = xpcf::deserialize<std::vector<uint32_t>>(respOut.correctedcloudpointids());
109111
return static_cast<SolAR::FrameworkReturnCode>(respOut.xpcfgrpcreturnvalue());
110112
}
111113

ILoopCorrector_grpcProxy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ILoopCorrector_grpcProxy: public org::bcom::xpcf::ConfigurableBase, virtu
2323
org::bcom::xpcf::XPCFErrorCode onConfigured() override;
2424

2525
SolAR::FrameworkReturnCode correct(SRef<SolAR::datastructure::Keyframe> const queryKeyframe, SRef<SolAR::datastructure::Keyframe> const detectedLoopKeyframe, SolAR::datastructure::Transform3Df const& S_wl_wc, std::vector<std::pair<uint32_t,uint32_t>> const& duplicatedPointsIndices) override;
26-
SolAR::FrameworkReturnCode correct(SRef<SolAR::datastructure::Keyframe> const queryKeyframe, SRef<SolAR::datastructure::Keyframe> const detectedLoopKeyframe, SolAR::datastructure::Transform3Df const& S_wl_wc, std::vector<std::pair<uint32_t,uint32_t>> const& duplicatedPointsIndices, std::vector<uint32_t>& correctedKeyframeIds) override;
26+
SolAR::FrameworkReturnCode correct(SRef<SolAR::datastructure::Keyframe> const queryKeyframe, SRef<SolAR::datastructure::Keyframe> const detectedLoopKeyframe, SolAR::datastructure::Transform3Df const& S_wl_wc, std::vector<std::pair<uint32_t,uint32_t>> const& duplicatedPointsIndices, std::vector<uint32_t>& correctedKeyframeIds, std::vector<uint32_t>& correctedCloudpointIds) override;
2727

2828

2929
private:

ILoopCorrector_grpcServer.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ ::grpc::Status ILoopCorrector_grpcServer::grpcILoopCorrectorServiceImpl::correct
8282
SolAR::datastructure::Transform3Df S_wl_wc = xpcf::deserialize<SolAR::datastructure::Transform3Df>(request->s_wl_wc());
8383
std::vector<std::pair<uint32_t,uint32_t>> duplicatedPointsIndices = xpcf::deserialize<std::vector<std::pair<uint32_t,uint32_t>>>(request->duplicatedpointsindices());
8484
std::vector<uint32_t> correctedKeyframeIds = xpcf::deserialize<std::vector<uint32_t>>(request->correctedkeyframeids());
85-
SolAR::FrameworkReturnCode returnValue = m_xpcfComponent->correct(queryKeyframe, detectedLoopKeyframe, S_wl_wc, duplicatedPointsIndices, correctedKeyframeIds);
85+
std::vector<uint32_t> correctedCloudpointIds = xpcf::deserialize<std::vector<uint32_t>>(request->correctedcloudpointids());
86+
SolAR::FrameworkReturnCode returnValue = m_xpcfComponent->correct(queryKeyframe, detectedLoopKeyframe, S_wl_wc, duplicatedPointsIndices, correctedKeyframeIds, correctedCloudpointIds);
8687
response->set_correctedkeyframeids(xpcf::serialize<std::vector<uint32_t>>(correctedKeyframeIds));
88+
response->set_correctedcloudpointids(xpcf::serialize<std::vector<uint32_t>>(correctedCloudpointIds));
8789
response->set_xpcfgrpcreturnvalue(static_cast<int32_t>(returnValue));
8890
#ifdef ENABLE_SERVER_TIMERS
8991
boost::posix_time::ptime end = boost::posix_time::microsec_clock::universal_time();

0 commit comments

Comments
 (0)