Skip to content

Commit

Permalink
DATA-723 Set Max Message Size for SLAM to 32 MB (RDK) (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyhyde-viam authored Dec 12, 2022
1 parent 81cc0ce commit 2fbba1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/slam/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@ func setupGRPCConnection(ctx context.Context, port string, logger golog.Logger)
// The 'port' provided in the config is already expected to include "localhost:", if needed, so that it doesn't need to be
// added anywhere in the code. This will allow cloud-based SLAM processing to exist in the future.
// TODO: add credentials when running SLAM processing in the cloud.
connLib, err := grpc.DialContext(ctx, port, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock())

// Increasing the gRPC max message size from the default value of 4MB to 32MB, to match the limit that is set in RDK. This is
// necessary for transmitting large pointclouds.
maxMsgSizeOption := grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(32 * 1024 * 1024))
connLib, err := grpc.DialContext(ctx, port, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), maxMsgSizeOption)
if err != nil {
logger.Errorw("error connecting to slam process", "error", err)
return nil, nil, err
Expand Down

0 comments on commit 2fbba1b

Please sign in to comment.