Skip to content

Commit

Permalink
batch_estimator -> batch
Browse files Browse the repository at this point in the history
  • Loading branch information
thowell committed Aug 2, 2023
1 parent 9a57f3e commit b94ad88
Show file tree
Hide file tree
Showing 14 changed files with 1,275 additions and 1,282 deletions.
56 changes: 28 additions & 28 deletions grpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ unset(BUILD_SHARED_LIBS_OLD)

get_filename_component(agent_service_proto "./agent.proto" ABSOLUTE)
get_filename_component(agent_service_proto_path "${agent_service_proto}" PATH)
get_filename_component(batch_estimator_service_proto "./batch_estimator.proto" ABSOLUTE)
get_filename_component(batch_estimator_service_proto_path "${batch_estimator_service_proto}" PATH)
get_filename_component(batch_service_proto "./batch.proto" ABSOLUTE)
get_filename_component(batch_service_proto_path "${batch_service_proto}" PATH)

# Generated sources
set(agent_service_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/agent.pb.cc")
set(agent_service_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/agent.pb.h")
set(agent_service_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/agent.grpc.pb.cc")
set(agent_service_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/agent.grpc.pb.h")

set(batch_estimator_service_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/batch_estimator.pb.cc")
set(batch_estimator_service_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/batch_estimator.pb.h")
set(batch_estimator_service_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/batch_estimator.grpc.pb.cc")
set(batch_estimator_service_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/batch_estimator.grpc.pb.h")
set(batch_service_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/batch.pb.cc")
set(batch_service_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/batch.pb.h")
set(batch_service_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/batch.grpc.pb.cc")
set(batch_service_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/batch.grpc.pb.h")

message("We need the following for agent/batch_estimator_protos:")
message("We need the following for agent/batch_protos:")
message(_GRPC_CPP_PLUGIN_EXECUTABLE${_GRPC_CPP_PLUGIN_EXECUTABLE})

add_custom_command(
Expand All @@ -88,19 +88,19 @@ add_custom_command(

add_custom_command(
OUTPUT
"${batch_estimator_service_proto_srcs}"
"${batch_estimator_service_proto_hdrs}"
"${batch_estimator_service_grpc_srcs}"
"${batch_estimator_service_grpc_hdrs}"
"${batch_service_proto_srcs}"
"${batch_service_proto_hdrs}"
"${batch_service_grpc_srcs}"
"${batch_service_grpc_hdrs}"
COMMAND ${_PROTOBUF_PROTOC}
ARGS
--grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
-I "${batch_estimator_service_proto_path}"
-I "${batch_service_proto_path}"
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
"${batch_estimator_service_proto}"
"${batch_service_proto}"
DEPENDS
"${batch_estimator_service_proto}"
"${batch_service_proto}"
)

# Include generated *.pb.h files
Expand Down Expand Up @@ -178,19 +178,19 @@ target_compile_options(ui_agent_server PUBLIC ${AGENT_SERVICE_COMPILE_OPTIONS})
target_link_options(ui_agent_server PRIVATE ${AGENT_SERVICE_LINK_OPTIONS})

add_executable(
batch_estimator_server
batch_estimator_server.cc
${batch_estimator_service_grpc_srcs}
${batch_estimator_service_grpc_hdrs}
${batch_estimator_service_proto_srcs}
${batch_estimator_service_proto_hdrs}
batch_estimator_service.h
batch_estimator_service.cc
batch_server
batch_server.cc
${batch_service_grpc_srcs}
${batch_service_grpc_hdrs}
${batch_service_proto_srcs}
${batch_service_proto_hdrs}
batch_service.h
batch_service.cc
)

target_link_libraries(
batch_estimator_server
# batch_estimator_service_grpc_proto
batch_server
# batch_service_grpc_proto
absl::check
absl::flags
absl::flags_parse
Expand All @@ -204,8 +204,8 @@ target_link_libraries(
mujoco::mujoco
libmjpc
)
target_include_directories(batch_estimator_server PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
message(batch_estimator_SERVICE_COMPILE_OPTIONS=${BATCH_ESTIMATOR_SERVICE_COMPILE_OPTIONS})
target_compile_options(batch_estimator_server PUBLIC ${BATCH_ESTIMATOR_SERVICE_COMPILE_OPTIONS})
target_link_options(batch_estimator_server PRIVATE ${BATCH_ESTIMATOR_SERVICE_LINK_OPTIONS})
target_include_directories(batch_server PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
message(BATCH_SERVICE_COMPILE_OPTIONS=${BATCH_ESTIMATOR_SERVICE_COMPILE_OPTIONS})
target_compile_options(batch_server PUBLIC ${BATCH_ESTIMATOR_SERVICE_COMPILE_OPTIONS})
target_link_options(batch_server PRIVATE ${BATCH_ESTIMATOR_SERVICE_LINK_OPTIONS})

28 changes: 14 additions & 14 deletions grpc/batch_estimator.proto → grpc/batch.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@

syntax = "proto3";

package batch_estimator;
package batch;

service BatchEstimator {
// Initialize BatchEstimator
service Batch {
// Initialize Batch
rpc Init(InitRequest) returns (InitResponse);
// Set BatchEstimator data
// Set Batch data
rpc Data(DataRequest) returns (DataResponse);
// BatchEstimator settings
// Batch settings
rpc Settings(SettingsRequest) returns (SettingsResponse);
// BatchEstimator costs
// Batch costs
rpc Cost(CostRequest) returns (CostResponse);
// BatchEstimator noise (process + sensor)
// Batch noise (process + sensor)
rpc Noise(NoiseRequest) returns (NoiseResponse);
// BatchEstimator norms
// Batch norms
rpc Norms(NormRequest) returns (NormResponse);
// Shift BatchEstimator trajectories
// Shift Batch trajectories
rpc Shift(ShiftRequest) returns (ShiftResponse);
// Reset BatchEstimator
// Reset Batch
rpc Reset(ResetRequest) returns (ResetResponse);
// Optimize BatchEstimator
// Optimize Batch
rpc Optimize(OptimizeRequest) returns (OptimizeResponse);
// Get BatchEstimator status
// Get Batch status
rpc Status(StatusRequest) returns (StatusResponse);
// Get BatchEstimator timing
// Get Batch timing
rpc Timing(TimingRequest) returns (TimingResponse);
// BatchEstimator prior matrix
// Batch prior matrix
rpc PriorWeights(PriorWeightsRequest) returns (PriorWeightsResponse);
}

Expand Down
Loading

0 comments on commit b94ad88

Please sign in to comment.