Skip to content

Commit fabcaed

Browse files
committed
Regenerate grpc files
1 parent 5fc77c1 commit fabcaed

9 files changed

+2740
-770
lines changed

gen/interfaces/IRelocalizationPipeline_grpcProxy.h

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class IRelocalizationPipeline_grpcProxy: public org::bcom::xpcf::ConfigurableBa
2828
SolAR::FrameworkReturnCode setCameraParameters(SolAR::datastructure::CameraParameters const& cameraParams) override;
2929
SolAR::FrameworkReturnCode getCameraParameters(SolAR::datastructure::CameraParameters& cameraParams) const override;
3030
SolAR::FrameworkReturnCode relocalizeProcessRequest(SRef<SolAR::datastructure::Image> const image, SolAR::datastructure::Transform3Df& pose, float_t& confidence, SolAR::datastructure::Transform3Df const& poseCoarse) override;
31+
SolAR::FrameworkReturnCode relocalizeProcessRequestViz(SRef<SolAR::datastructure::Image> const image, std::vector<SRef<SolAR::datastructure::CloudPoint>>& currPointCloud, SolAR::datastructure::Transform3Df& pose, float_t& confidence, SolAR::datastructure::Transform3Df const& poseCoarse) override;
3132
SolAR::FrameworkReturnCode relocalizeProcessRequest(SRef<SolAR::datastructure::Image> const image, SolAR::datastructure::Transform3Df& pose, float_t& confidence, std::vector<SolAR::datastructure::DetectedObject>& detectedObjects, SolAR::datastructure::Transform3Df const& poseCoarse) override;
3233
SolAR::FrameworkReturnCode getMapRequest(SRef<SolAR::datastructure::Map>& map) const override;
3334

gen/interfaces/IRelocalizationPipeline_grpcServer.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class IRelocalizationPipeline_grpcServer: public org::bcom::xpcf::ConfigurableB
3131
::grpc::Status setCameraParameters(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::setCameraParametersRequest* request, ::grpcIRelocalizationPipeline::setCameraParametersResponse* response) override;
3232
::grpc::Status getCameraParameters(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::getCameraParametersRequest* request, ::grpcIRelocalizationPipeline::getCameraParametersResponse* response) override;
3333
::grpc::Status relocalizeProcessRequest_grpc0(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc0Request* request, ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc0Response* response) override;
34+
::grpc::Status relocalizeProcessRequestViz(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::relocalizeProcessRequestVizRequest* request, ::grpcIRelocalizationPipeline::relocalizeProcessRequestVizResponse* response) override;
3435
::grpc::Status relocalizeProcessRequest_grpc1(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc1Request* request, ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc1Response* response) override;
3536
::grpc::Status getMapRequest(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::getMapRequestRequest* request, ::grpcIRelocalizationPipeline::getMapRequestResponse* response) override;
3637

gen/interfaces/grpcIRelocalizationPipelineService.grpc.pb.h

+179-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/interfaces/grpcIRelocalizationPipelineService.pb.h

+1,403-519
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/proto/grpcIRelocalizationPipelineService.proto

+19
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@ bytes confidence = 2;
7373
sint32 xpcfGrpcReturnValue = 3;
7474
}
7575

76+
message relocalizeProcessRequestVizRequest
77+
{
78+
int32 grpcServerCompressionFormat = 1;
79+
bytes image = 2;
80+
bytes poseCoarse = 3;
81+
bytes currPointCloud = 4;
82+
bytes pose = 5;
83+
bytes confidence = 6;
84+
}
85+
86+
message relocalizeProcessRequestVizResponse
87+
{
88+
bytes currPointCloud = 1;
89+
bytes pose = 2;
90+
bytes confidence = 3;
91+
sint32 xpcfGrpcReturnValue = 4;
92+
}
93+
7694
message relocalizeProcessRequest_grpc1Request
7795
{
7896
int32 grpcServerCompressionFormat = 1;
@@ -110,6 +128,7 @@ rpc stop(stopRequest) returns(stopResponse) {}
110128
rpc setCameraParameters(setCameraParametersRequest) returns(setCameraParametersResponse) {}
111129
rpc getCameraParameters(getCameraParametersRequest) returns(getCameraParametersResponse) {}
112130
rpc relocalizeProcessRequest_grpc0(relocalizeProcessRequest_grpc0Request) returns(relocalizeProcessRequest_grpc0Response) {}
131+
rpc relocalizeProcessRequestViz(relocalizeProcessRequestVizRequest) returns(relocalizeProcessRequestVizResponse) {}
113132
rpc relocalizeProcessRequest_grpc1(relocalizeProcessRequest_grpc1Request) returns(relocalizeProcessRequest_grpc1Response) {}
114133
rpc getMapRequest(getMapRequestRequest) returns(getMapRequestResponse) {}
115134
}

gen/src/IRelocalizationPipeline_grpcProxy.cpp

+38-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ IRelocalizationPipeline_grpcProxy::IRelocalizationPipeline_grpcProxy():xpcf::Con
1919
declareInterface<SolAR::api::pipeline::IRelocalizationPipeline>(this);
2020
declareProperty("channelUrl",m_channelUrl);
2121
declareProperty("channelCredentials",m_channelCredentials);
22-
m_grpcProxyCompressionConfig.resize(9);
22+
m_grpcProxyCompressionConfig.resize(10);
2323
declarePropertySequence("grpc_compress_proxy", m_grpcProxyCompressionConfig);
2424
}
2525

@@ -230,6 +230,43 @@ SolAR::FrameworkReturnCode IRelocalizationPipeline_grpcProxy::relocalizeProcess
230230
}
231231

232232

233+
SolAR::FrameworkReturnCode IRelocalizationPipeline_grpcProxy::relocalizeProcessRequestViz(SRef<SolAR::datastructure::Image> const image, std::vector<SRef<SolAR::datastructure::CloudPoint>>& currPointCloud, SolAR::datastructure::Transform3Df& pose, float_t& confidence, SolAR::datastructure::Transform3Df const& poseCoarse)
234+
{
235+
::grpc::ClientContext context;
236+
::grpcIRelocalizationPipeline::relocalizeProcessRequestVizRequest reqIn;
237+
::grpcIRelocalizationPipeline::relocalizeProcessRequestVizResponse respOut;
238+
#ifndef DISABLE_GRPC_COMPRESSION
239+
xpcf::grpcCompressionInfos proxyCompressionInfo = xpcf::deduceClientCompressionInfo(m_serviceCompressionInfos, "relocalizeProcessRequestViz", m_methodCompressionInfosMap);
240+
xpcf::grpcCompressType serverCompressionType = xpcf::prepareClientCompressionContext(context, proxyCompressionInfo);
241+
reqIn.set_grpcservercompressionformat (static_cast<int32_t>(serverCompressionType));
242+
#endif
243+
reqIn.set_image(xpcf::serialize<SRef<SolAR::datastructure::Image>>(image));
244+
reqIn.set_posecoarse(xpcf::serialize<SolAR::datastructure::Transform3Df>(poseCoarse));
245+
reqIn.set_currpointcloud(xpcf::serialize<std::vector<SRef<SolAR::datastructure::CloudPoint>>>(currPointCloud));
246+
reqIn.set_pose(xpcf::serialize<SolAR::datastructure::Transform3Df>(pose));
247+
reqIn.set_confidence(xpcf::serialize<float_t>(confidence));
248+
#ifdef ENABLE_PROXY_TIMERS
249+
boost::posix_time::ptime start = boost::posix_time::microsec_clock::universal_time();
250+
std::cout << "====> IRelocalizationPipeline_grpcProxy::relocalizeProcessRequestViz request sent at " << to_simple_string(start) << std::endl;
251+
#endif
252+
::grpc::Status grpcRemoteStatus = m_grpcStub->relocalizeProcessRequestViz(&context, reqIn, &respOut);
253+
#ifdef ENABLE_PROXY_TIMERS
254+
boost::posix_time::ptime end = boost::posix_time::microsec_clock::universal_time();
255+
std::cout << "====> IRelocalizationPipeline_grpcProxy::relocalizeProcessRequestViz response received at " << to_simple_string(end) << std::endl;
256+
std::cout << " => elapsed time = " << ((end - start).total_microseconds() / 1000.00) << " ms" << std::endl;
257+
#endif
258+
if (!grpcRemoteStatus.ok()) {
259+
std::cout << "relocalizeProcessRequestViz rpc failed." << std::endl;
260+
throw xpcf::RemotingException("grpcIRelocalizationPipelineService","relocalizeProcessRequestViz",static_cast<uint32_t>(grpcRemoteStatus.error_code()));
261+
}
262+
263+
currPointCloud = xpcf::deserialize<std::vector<SRef<SolAR::datastructure::CloudPoint>>>(respOut.currpointcloud());
264+
pose = xpcf::deserialize<SolAR::datastructure::Transform3Df>(respOut.pose());
265+
confidence = xpcf::deserialize<float_t>(respOut.confidence());
266+
return static_cast<SolAR::FrameworkReturnCode>(respOut.xpcfgrpcreturnvalue());
267+
}
268+
269+
233270
SolAR::FrameworkReturnCode IRelocalizationPipeline_grpcProxy::relocalizeProcessRequest(SRef<SolAR::datastructure::Image> const image, SolAR::datastructure::Transform3Df& pose, float_t& confidence, std::vector<SolAR::datastructure::DetectedObject>& detectedObjects, SolAR::datastructure::Transform3Df const& poseCoarse)
234271
{
235272
::grpc::ClientContext context;

gen/src/IRelocalizationPipeline_grpcServer.cpp

+31-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IRelocalizationPipeline_grpcServer::IRelocalizationPipeline_grpcServer():xpcf::C
1414
{
1515
declareInterface<xpcf::IGrpcService>(this);
1616
declareInjectable<SolAR::api::pipeline::IRelocalizationPipeline>(m_grpcService.m_xpcfComponent);
17-
m_grpcServerCompressionConfig.resize(9);
17+
m_grpcServerCompressionConfig.resize(10);
1818
declarePropertySequence("grpc_compress_server", m_grpcServerCompressionConfig);
1919
}
2020

@@ -181,6 +181,36 @@ ::grpc::Status IRelocalizationPipeline_grpcServer::grpcIRelocalizationPipelineSe
181181
}
182182

183183

184+
::grpc::Status IRelocalizationPipeline_grpcServer::grpcIRelocalizationPipelineServiceImpl::relocalizeProcessRequestViz(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::relocalizeProcessRequestVizRequest* request, ::grpcIRelocalizationPipeline::relocalizeProcessRequestVizResponse* response)
185+
{
186+
#ifndef DISABLE_GRPC_COMPRESSION
187+
xpcf::grpcCompressType askedCompressionType = static_cast<xpcf::grpcCompressType>(request->grpcservercompressionformat());
188+
xpcf::grpcServerCompressionInfos serverCompressInfo = xpcf::deduceServerCompressionType(askedCompressionType, m_serviceCompressionInfos, "relocalizeProcessRequestViz", m_methodCompressionInfosMap);
189+
xpcf::prepareServerCompressionContext(context, serverCompressInfo);
190+
#endif
191+
#ifdef ENABLE_SERVER_TIMERS
192+
boost::posix_time::ptime start = boost::posix_time::microsec_clock::universal_time();
193+
std::cout << "====> IRelocalizationPipeline_grpcServer::relocalizeProcessRequestViz request received at " << to_simple_string(start) << std::endl;
194+
#endif
195+
SRef<SolAR::datastructure::Image> image = xpcf::deserialize<SRef<SolAR::datastructure::Image>>(request->image());
196+
std::vector<SRef<SolAR::datastructure::CloudPoint>> currPointCloud = xpcf::deserialize<std::vector<SRef<SolAR::datastructure::CloudPoint>>>(request->currpointcloud());
197+
SolAR::datastructure::Transform3Df pose = xpcf::deserialize<SolAR::datastructure::Transform3Df>(request->pose());
198+
float_t confidence = xpcf::deserialize<float_t>(request->confidence());
199+
SolAR::datastructure::Transform3Df poseCoarse = xpcf::deserialize<SolAR::datastructure::Transform3Df>(request->posecoarse());
200+
SolAR::FrameworkReturnCode returnValue = m_xpcfComponent->relocalizeProcessRequestViz(image, currPointCloud, pose, confidence, poseCoarse);
201+
response->set_currpointcloud(xpcf::serialize<std::vector<SRef<SolAR::datastructure::CloudPoint>>>(currPointCloud));
202+
response->set_pose(xpcf::serialize<SolAR::datastructure::Transform3Df>(pose));
203+
response->set_confidence(xpcf::serialize<float_t>(confidence));
204+
response->set_xpcfgrpcreturnvalue(static_cast<int32_t>(returnValue));
205+
#ifdef ENABLE_SERVER_TIMERS
206+
boost::posix_time::ptime end = boost::posix_time::microsec_clock::universal_time();
207+
std::cout << "====> IRelocalizationPipeline_grpcServer::relocalizeProcessRequestViz response sent at " << to_simple_string(end) << std::endl;
208+
std::cout << " => elapsed time = " << ((end - start).total_microseconds() / 1000.00) << " ms" << std::endl;
209+
#endif
210+
return ::grpc::Status::OK;
211+
}
212+
213+
184214
::grpc::Status IRelocalizationPipeline_grpcServer::grpcIRelocalizationPipelineServiceImpl::relocalizeProcessRequest_grpc1(::grpc::ServerContext* context, const ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc1Request* request, ::grpcIRelocalizationPipeline::relocalizeProcessRequest_grpc1Response* response)
185215
{
186216
#ifndef DISABLE_GRPC_COMPRESSION

gen/src/grpcIRelocalizationPipelineService.grpc.pb.cc

+45-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)