├── LICENSE
├── README.md
├── choreography_protos
└── README.md
├── cpp
├── CMakeLists.txt
├── README.md
├── bosdyn
│ ├── client
│ │ ├── README.md
│ │ ├── auth
│ │ │ ├── auth_client.cpp
│ │ │ ├── auth_client.h
│ │ │ ├── auth_error_codes.cpp
│ │ │ └── auth_error_codes.h
│ │ ├── auto_return
│ │ │ ├── auto_return_client.cpp
│ │ │ ├── auto_return_client.h
│ │ │ ├── auto_return_error_codes.cpp
│ │ │ └── auto_return_error_codes.h
│ │ ├── autowalk
│ │ │ ├── autowalk_client.cpp
│ │ │ ├── autowalk_client.hpp
│ │ │ ├── autowalk_error_codes.cpp
│ │ │ └── autowalk_error_codes.h
│ │ ├── data_acquisition
│ │ │ ├── data_acquisition_client.cpp
│ │ │ ├── data_acquisition_client.h
│ │ │ ├── data_acquisition_error_codes.cpp
│ │ │ └── data_acquisition_error_codes.h
│ │ ├── data_acquisition_store
│ │ │ ├── data_acquisition_store_client.cpp
│ │ │ └── data_acquisition_store_client.h
│ │ ├── data_buffer
│ │ │ ├── data_buffer_client.cpp
│ │ │ ├── data_buffer_client.h
│ │ │ ├── data_buffer_error_codes.cpp
│ │ │ ├── data_buffer_error_codes.h
│ │ │ ├── signal_schema_key.cpp
│ │ │ └── signal_schema_key.h
│ │ ├── data_chunk
│ │ │ ├── data_chunking.cpp
│ │ │ └── data_chunking.h
│ │ ├── directory
│ │ │ ├── directory_client.cpp
│ │ │ ├── directory_client.h
│ │ │ ├── directory_error_codes.cpp
│ │ │ ├── directory_error_codes.h
│ │ │ ├── directory_helpers.cpp
│ │ │ ├── directory_helpers.h
│ │ │ ├── util.cpp
│ │ │ └── util.h
│ │ ├── directory_registration
│ │ │ ├── directory_registration_client.cpp
│ │ │ ├── directory_registration_client.h
│ │ │ ├── directory_registration_error_codes.cpp
│ │ │ ├── directory_registration_error_codes.h
│ │ │ ├── directory_registration_helpers.cpp
│ │ │ └── directory_registration_helpers.h
│ │ ├── docking
│ │ │ ├── docking_client.cpp
│ │ │ ├── docking_client.h
│ │ │ ├── docking_error_codes.cpp
│ │ │ ├── docking_error_codes.h
│ │ │ ├── docking_helpers.cpp
│ │ │ └── docking_helpers.h
│ │ ├── error_codes
│ │ │ ├── client_creation_error_code.cpp
│ │ │ ├── client_creation_error_code.h
│ │ │ ├── directory_helper_error_code.cpp
│ │ │ ├── directory_helper_error_code.h
│ │ │ ├── docking_helper_error_code.cpp
│ │ │ ├── docking_helper_error_code.h
│ │ │ ├── error_type_condition.cpp
│ │ │ ├── error_type_condition.h
│ │ │ ├── header_error_code.cpp
│ │ │ ├── header_error_code.h
│ │ │ ├── joint_control_stream_error_code.cpp
│ │ │ ├── joint_control_stream_error_code.h
│ │ │ ├── lease_wallet_error_code.cpp
│ │ │ ├── lease_wallet_error_code.h
│ │ │ ├── proto_enum_to_stderror_macro.h
│ │ │ ├── proto_enum_to_stderror_macro_source.h
│ │ │ ├── ret_error.cpp
│ │ │ ├── ret_error.h
│ │ │ ├── rpc_error_code.cpp
│ │ │ ├── rpc_error_code.h
│ │ │ ├── sdk_error_code.cpp
│ │ │ ├── sdk_error_code.h
│ │ │ ├── time_sync_helper_error_code.cpp
│ │ │ └── time_sync_helper_error_code.h
│ │ ├── estop
│ │ │ ├── estop_client.cpp
│ │ │ ├── estop_client.h
│ │ │ ├── estop_endpoint.cpp
│ │ │ ├── estop_endpoint.h
│ │ │ ├── estop_error_codes.cpp
│ │ │ ├── estop_error_codes.h
│ │ │ ├── estop_helpers_inl.h
│ │ │ ├── estop_keepalive.cpp
│ │ │ └── estop_keepalive.h
│ │ ├── fault
│ │ │ ├── fault_client.cpp
│ │ │ ├── fault_client.h
│ │ │ ├── fault_error_codes.cpp
│ │ │ ├── fault_error_codes.h
│ │ │ ├── util.cpp
│ │ │ └── util.h
│ │ ├── graph_nav
│ │ │ ├── graph_nav_client.cpp
│ │ │ ├── graph_nav_client.h
│ │ │ ├── graph_nav_error_codes.cpp
│ │ │ ├── graph_nav_error_codes.h
│ │ │ ├── recording_client.cpp
│ │ │ ├── recording_client.h
│ │ │ ├── recording_error_codes.cpp
│ │ │ └── recording_error_codes.h
│ │ ├── gripper_camera_param
│ │ │ ├── gripper_camera_param_client.cpp
│ │ │ └── gripper_camera_param_client.h
│ │ ├── image
│ │ │ ├── image_client.cpp
│ │ │ ├── image_client.h
│ │ │ ├── image_error_codes.cpp
│ │ │ ├── image_error_codes.h
│ │ │ └── image_source_names.h
│ │ ├── inverse_kinematics
│ │ │ ├── inverse_kinematics_client.cpp
│ │ │ ├── inverse_kinematics_client.h
│ │ │ ├── inverse_kinematics_error_codes.cpp
│ │ │ └── inverse_kinematics_error_codes.h
│ │ ├── keepalive
│ │ │ ├── keepalive_client.cpp
│ │ │ ├── keepalive_client.h
│ │ │ ├── keepalive_error_codes.cpp
│ │ │ └── keepalive_error_codes.h
│ │ ├── lease
│ │ │ ├── lease.cpp
│ │ │ ├── lease.h
│ │ │ ├── lease_client.cpp
│ │ │ ├── lease_client.h
│ │ │ ├── lease_error_codes.cpp
│ │ │ ├── lease_error_codes.h
│ │ │ ├── lease_keepalive.cpp
│ │ │ ├── lease_keepalive.h
│ │ │ ├── lease_processors.h
│ │ │ ├── lease_resources.h
│ │ │ ├── lease_wallet.cpp
│ │ │ └── lease_wallet.h
│ │ ├── license
│ │ │ ├── license_client.cpp
│ │ │ └── license_client.h
│ │ ├── local_grid
│ │ │ ├── local_grid_client.cpp
│ │ │ ├── local_grid_client.h
│ │ │ ├── local_grid_error_codes.cpp
│ │ │ └── local_grid_error_codes.h
│ │ ├── log_status
│ │ │ ├── log_status_client.cpp
│ │ │ ├── log_status_client.h
│ │ │ ├── log_status_error_codes.cpp
│ │ │ └── log_status_error_codes.h
│ │ ├── manipulation_api
│ │ │ ├── manipulation_api_client.cpp
│ │ │ └── manipulation_api_client.h
│ │ ├── mission
│ │ │ ├── mission_client.cpp
│ │ │ ├── mission_client.h
│ │ │ ├── mission_error_codes.cpp
│ │ │ └── mission_error_codes.h
│ │ ├── network_compute_bridge
│ │ │ ├── network_compute_bridge_client.cpp
│ │ │ ├── network_compute_bridge_client.h
│ │ │ ├── network_compute_bridge_error_codes.cpp
│ │ │ └── network_compute_bridge_error_codes.h
│ │ ├── payload
│ │ │ ├── payload_client.cpp
│ │ │ └── payload_client.h
│ │ ├── payload_registration
│ │ │ ├── payload_registration_client.cpp
│ │ │ ├── payload_registration_client.h
│ │ │ ├── payload_registration_error_codes.cpp
│ │ │ ├── payload_registration_error_codes.h
│ │ │ ├── payload_registration_helpers.cpp
│ │ │ └── payload_registration_helpers.h
│ │ ├── point_cloud
│ │ │ ├── point_cloud_client.cpp
│ │ │ ├── point_cloud_client.h
│ │ │ ├── point_cloud_error_codes.cpp
│ │ │ └── point_cloud_error_codes.h
│ │ ├── power
│ │ │ ├── power_client.cpp
│ │ │ ├── power_client.h
│ │ │ ├── power_client_helper.cpp
│ │ │ ├── power_client_helper.h
│ │ │ ├── power_error_codes.cpp
│ │ │ └── power_error_codes.h
│ │ ├── processors
│ │ │ ├── app_token_request_processor.cpp
│ │ │ ├── app_token_request_processor.h
│ │ │ ├── common_request_processor.cpp
│ │ │ ├── common_request_processor.h
│ │ │ ├── common_response_processor.cpp
│ │ │ ├── common_response_processor.h
│ │ │ ├── request_processor.h
│ │ │ ├── request_processor_chain.cpp
│ │ │ ├── request_processor_chain.h
│ │ │ ├── response_processor.h
│ │ │ ├── response_processor_chain.cpp
│ │ │ └── response_processor_chain.h
│ │ ├── robot
│ │ │ ├── robot.cpp
│ │ │ ├── robot.h
│ │ │ ├── token_cache.h
│ │ │ ├── token_manager.cpp
│ │ │ └── token_manager.h
│ │ ├── robot_command
│ │ │ ├── robot_command_builder.cpp
│ │ │ ├── robot_command_builder.h
│ │ │ ├── robot_command_client.cpp
│ │ │ ├── robot_command_client.h
│ │ │ ├── robot_command_error_codes.cpp
│ │ │ ├── robot_command_error_codes.h
│ │ │ ├── robot_command_helpers.cpp
│ │ │ ├── robot_command_helpers.h
│ │ │ ├── robot_command_streaming_client.cpp
│ │ │ └── robot_command_streaming_client.h
│ │ ├── robot_id
│ │ │ ├── robot_id_client.cpp
│ │ │ └── robot_id_client.h
│ │ ├── robot_state
│ │ │ ├── robot_state_client.cpp
│ │ │ ├── robot_state_client.h
│ │ │ ├── robot_state_streaming_client.cpp
│ │ │ └── robot_state_streaming_client.h
│ │ ├── sdk
│ │ │ ├── client_sdk.cpp
│ │ │ ├── client_sdk.h
│ │ │ └── client_sdk_include_clients.cpp
│ │ ├── service_client
│ │ │ ├── channel.cpp
│ │ │ ├── channel.h
│ │ │ ├── client_header_handling.h
│ │ │ ├── common_result_types.h
│ │ │ ├── message_pump.cpp
│ │ │ ├── message_pump.h
│ │ │ ├── result.h
│ │ │ ├── rpc_parameters.h
│ │ │ └── service_client.h
│ │ ├── spot_cam
│ │ │ ├── audio
│ │ │ │ ├── audio_client.cpp
│ │ │ │ ├── audio_client.h
│ │ │ │ ├── audio_error_codes.cpp
│ │ │ │ └── audio_error_codes.h
│ │ │ ├── compositor
│ │ │ │ ├── compositor_client.cpp
│ │ │ │ ├── compositor_client.h
│ │ │ │ ├── compositor_error_codes.cpp
│ │ │ │ └── compositor_error_codes.h
│ │ │ ├── health
│ │ │ │ ├── health_client.cpp
│ │ │ │ ├── health_client.h
│ │ │ │ ├── health_error_codes.cpp
│ │ │ │ └── health_error_codes.h
│ │ │ ├── lighting
│ │ │ │ ├── lighting_client.cpp
│ │ │ │ ├── lighting_client.h
│ │ │ │ ├── lighting_error_codes.cpp
│ │ │ │ └── lighting_error_codes.h
│ │ │ ├── media_log
│ │ │ │ ├── media_log_client.cpp
│ │ │ │ ├── media_log_client.h
│ │ │ │ ├── media_log_error_codes.cpp
│ │ │ │ └── media_log_error_codes.h
│ │ │ ├── network
│ │ │ │ ├── network_client.cpp
│ │ │ │ ├── network_client.h
│ │ │ │ ├── network_error_codes.cpp
│ │ │ │ └── network_error_codes.h
│ │ │ ├── power
│ │ │ │ ├── power_client.cpp
│ │ │ │ ├── power_client.h
│ │ │ │ ├── power_error_codes.cpp
│ │ │ │ └── power_error_codes.h
│ │ │ ├── ptz
│ │ │ │ ├── ptz_client.cpp
│ │ │ │ ├── ptz_client.h
│ │ │ │ ├── ptz_error_codes.cpp
│ │ │ │ └── ptz_error_codes.h
│ │ │ ├── streamquality
│ │ │ │ ├── streamquality_client.cpp
│ │ │ │ └── streamquality_client.h
│ │ │ └── version
│ │ │ │ ├── version_client.cpp
│ │ │ │ ├── version_client.h
│ │ │ │ ├── version_error_codes.cpp
│ │ │ │ └── version_error_codes.h
│ │ ├── time_sync
│ │ │ ├── time_sync_client.cpp
│ │ │ ├── time_sync_client.h
│ │ │ ├── time_sync_error_codes.cpp
│ │ │ ├── time_sync_error_codes.h
│ │ │ ├── time_sync_helpers.cpp
│ │ │ └── time_sync_helpers.h
│ │ ├── util
│ │ │ ├── cli_util.cpp
│ │ │ └── cli_util.h
│ │ └── world_objects
│ │ │ ├── world_object_client.cpp
│ │ │ ├── world_object_client.h
│ │ │ ├── world_object_client_error_codes.cpp
│ │ │ ├── world_object_client_error_codes.h
│ │ │ ├── world_object_types.cpp
│ │ │ └── world_object_types.h
│ ├── common
│ │ ├── assert_precondition.cpp
│ │ ├── assert_precondition.h
│ │ ├── common_header_handling.cpp
│ │ ├── common_header_handling.h
│ │ ├── compiler_definitions.h
│ │ ├── int_wrapper.h
│ │ ├── mission_filesystem.h
│ │ ├── numbers.h
│ │ ├── proto_file.cpp
│ │ ├── proto_file.h
│ │ ├── robot_time_converter.cpp
│ │ ├── robot_time_converter.h
│ │ ├── status.cpp
│ │ ├── status.h
│ │ ├── string_util.cpp
│ │ ├── string_util.h
│ │ ├── strip_bytes_fields.cpp
│ │ ├── strip_bytes_fields.h
│ │ ├── success_condition.cpp
│ │ ├── success_condition.h
│ │ ├── time.cpp
│ │ └── time.h
│ └── math
│ │ ├── README.md
│ │ ├── api_common_frames.cpp
│ │ ├── api_common_frames.h
│ │ ├── frame_helpers.cpp
│ │ ├── frame_helpers.h
│ │ ├── pose_interpolation.cpp
│ │ ├── pose_interpolation.h
│ │ ├── proto_math.cpp
│ │ └── proto_math.h
├── cmake
│ └── ProjectConfig.cmake.in
└── examples
│ ├── README.md
│ ├── arm_grasp_carry_overrides
│ ├── README.md
│ └── arm_grasp_carry_overrides.cpp
│ ├── arm_manipulation_api_walk_to
│ ├── README.md
│ └── arm_manipulation_api_walk_to.cpp
│ ├── basic_robot_command
│ ├── README.md
│ └── basic_robot_command.cpp
│ ├── get_image
│ ├── README.md
│ └── get_image.cpp
│ ├── hello_spot
│ ├── README.md
│ └── hello_spot.cpp
│ ├── inverse_kinematics_reachability
│ ├── README.md
│ └── inverse_kinematics_reachability.cpp
│ ├── joint_control
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── constants.hpp
│ ├── joint_api_helper.cpp
│ ├── joint_api_helper.hpp
│ ├── noarm_squat.cpp
│ └── wiggle_arm_example.cpp
│ ├── query_autowalk_status
│ ├── README.md
│ ├── autowalk_player.cpp
│ ├── autowalk_player.hpp
│ └── query_autowalk_status.cpp
│ └── spot_cam
│ ├── README.md
│ └── ptz_example.cpp
├── docs
├── cpp
│ ├── README.md
│ ├── cpp_sdk_differences.md
│ ├── object_ownership_diagram.svg
│ └── quickstart.md
└── cpp_release_notes.md
└── protos
├── README.md
└── bosdyn
└── api
├── README.md
├── alerts.proto
├── arm_command.proto
├── arm_surface_contact.proto
├── arm_surface_contact_service.proto
├── auth.proto
├── auth_service.proto
├── auto_return
├── auto_return.proto
└── auto_return_service.proto
├── autowalk
├── autowalk.proto
├── autowalk_service.proto
└── walks.proto
├── basic_command.proto
├── bddf.proto
├── data_acquisition.proto
├── data_acquisition_plugin_service.proto
├── data_acquisition_service.proto
├── data_acquisition_store.proto
├── data_acquisition_store_service.proto
├── data_buffer.proto
├── data_buffer_service.proto
├── data_chunk.proto
├── data_index.proto
├── data_service.proto
├── directory.proto
├── directory_registration.proto
├── directory_registration_service.proto
├── directory_service.proto
├── docking
├── docking.proto
└── docking_service.proto
├── estop.proto
├── estop_service.proto
├── fault_service.proto
├── full_body_command.proto
├── geometry.proto
├── gps
├── aggregator.proto
├── aggregator_service.proto
├── gps.proto
├── registration.proto
└── registration_service.proto
├── graph_nav
├── area_callback.proto
├── area_callback_data.proto
├── area_callback_service.proto
├── gps.proto
├── graph_nav.proto
├── graph_nav_service.proto
├── lost_detection.proto
├── map.proto
├── map_processing.proto
├── map_processing_service.proto
├── nav.proto
├── recording.proto
└── recording_service.proto
├── gripper_camera_param.proto
├── gripper_camera_param_service.proto
├── gripper_command.proto
├── header.proto
├── image.proto
├── image_geometry.proto
├── image_service.proto
├── ir_enable_disable.proto
├── ir_enable_disable_service.proto
├── keepalive
├── keepalive.proto
└── keepalive_service.proto
├── lease.proto
├── lease_service.proto
├── license.proto
├── license_service.proto
├── local_grid.proto
├── local_grid_service.proto
├── log_status
├── log_status.proto
└── log_status_service.proto
├── manipulation_api.proto
├── manipulation_api_service.proto
├── metrics_logging
├── absolute_metrics.proto
├── metrics_logging_robot.proto
├── metrics_logging_robot_service.proto
└── signed_proto.proto
├── mission
├── mission.proto
├── mission_service.proto
├── nodes.proto
├── remote.proto
├── remote_service.proto
└── util.proto
├── mobility_command.proto
├── network_compute_bridge.proto
├── network_compute_bridge_service.proto
├── network_stats.proto
├── parameter.proto
├── payload.proto
├── payload_estimation.proto
├── payload_registration.proto
├── payload_registration_service.proto
├── payload_service.proto
├── payload_software_update.proto
├── payload_software_update_initiation.proto
├── payload_software_update_initiation_service.proto
├── payload_software_update_service.proto
├── point_cloud.proto
├── point_cloud_service.proto
├── power.proto
├── power_service.proto
├── ray_cast.proto
├── ray_cast_service.proto
├── robot_command.proto
├── robot_command_service.proto
├── robot_id.proto
├── robot_id_service.proto
├── robot_state.proto
├── robot_state_service.proto
├── service_customization.proto
├── service_fault.proto
├── signals.proto
├── software_package.proto
├── sparse_features.proto
├── spot
├── choreography_params.proto
├── choreography_sequence.proto
├── choreography_service.proto
├── door.proto
├── door_area_callback.proto
├── door_service.proto
├── inverse_kinematics.proto
├── inverse_kinematics_service.proto
├── robot_command.proto
├── spot_check.proto
├── spot_check_service.proto
└── spot_constants.proto
├── spot_cam
├── LED.proto
├── audio.proto
├── camera.proto
├── compositor.proto
├── health.proto
├── logging.proto
├── network.proto
├── power.proto
├── ptz.proto
├── service.proto
├── streamquality.proto
└── version.proto
├── stairs.proto
├── synchronized_command.proto
├── time_range.proto
├── time_sync.proto
├── time_sync_service.proto
├── trajectory.proto
├── units.proto
├── world_object.proto
└── world_object_service.proto
/choreography_protos/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # bosdyn-choreography-protos
10 |
11 |
12 |
13 |
14 |
15 | The bosdyn-choreography-protos wheel has been deprecated. The Python implementation for the Protobuf definitions previously stored in this build has been integrated with the [bosdyn-api wheel](https://pypi.org/project/bosdyn-api/).
16 |
--------------------------------------------------------------------------------
/cpp/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Boston Dynamics API - C++
10 |
11 | The C++ SDK includes C++ libraries and examples.
12 |
13 | ## Coding standards and dependencies.
14 |
15 | The C++ implementation follows these requirements:
16 |
17 | - A modern C++14 compiler toolchain.
18 | - Does not make use of exceptions or RTTI.
19 | - Generally complies with the Google C++ style guide.
20 | - Doxygen-friendly comments, particularly in header files.
21 |
22 | Library Dependencies:
23 |
24 | - C++14 standard library. Many advanced features, such as functional programming and concurrency support are used.
25 | - Google's gRPC C++ library, as well as it's transitive dependencies.
26 | - Unit tests depend on gTest.
27 | - Eigen for math operations
28 |
29 | ## Contents
30 |
31 | - [Client](bosdyn/client/README.md)
32 | - [Common](bosdyn/common/README.md)
33 | - [Math](bosdyn/math/README.md)
34 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/auth/auth_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/auth/auth_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(GetAuthTokenResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/auth/auth_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(GetAuthTokenResponse_Status)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/auto_return/auto_return_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/auto_return/auto_return_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_AUTO_RETURN(ConfigureResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_AUTO_RETURN(StartResponse_Status, valcode == 1)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/auto_return/auto_return_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_AUTO_RETURN(ConfigureResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_AUTO_RETURN(StartResponse_Status)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/autowalk/autowalk_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/autowalk/autowalk_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_AUTOWALK(CompileAutowalkResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_AUTOWALK(LoadAutowalkResponse_Status, valcode == 1)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/autowalk/autowalk_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_AUTOWALK(CompileAutowalkResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_AUTOWALK(LoadAutowalkResponse_Status)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_acquisition/data_acquisition_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/data_acquisition/data_acquisition_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(AcquireDataResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(CancelAcquisitionResponse_Status, valcode == 1)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_acquisition/data_acquisition_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(AcquireDataResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(CancelAcquisitionResponse_Status)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_buffer/data_buffer_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/data_buffer/data_buffer_error_codes.h"
11 |
12 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
13 |
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RecordTextMessagesResponse_Error_Type, valcode == 0)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RecordOperatorCommentsResponse_Error_Type, valcode == 0)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RecordDataBlobsResponse_Error_Type, valcode == 0)
17 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RecordSignalTicksResponse_Error_Type, valcode == 0)
18 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RecordEventsResponse_Error_Type, valcode == 0)
19 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_buffer/data_buffer_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
15 |
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RecordTextMessagesResponse_Error_Type)
17 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RecordOperatorCommentsResponse_Error_Type)
18 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RecordDataBlobsResponse_Error_Type)
19 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RecordSignalTicksResponse_Error_Type)
20 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RecordEventsResponse_Error_Type)
21 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_buffer/signal_schema_key.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "signal_schema_key.h"
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 | namespace data_buffer {
18 |
19 | namespace {
20 | uint64_t djb2(const char* str, size_t sz) {
21 | uint64_t hash = 5381;
22 | for (size_t i = 0; i < sz; i++) {
23 | hash = ((hash << 5) + hash) + static_cast(str[i]);
24 | }
25 | return hash;
26 | }
27 | } // namespace
28 |
29 | uint64_t SignalSchemaKey::ComputeHash() {
30 | const std::string repr = std::to_string(m_salt) + ClientName() + SerializedSchema();
31 | m_hash = djb2(repr.c_str(), repr.size());
32 | return m_hash;
33 | }
34 |
35 | uint64_t SignalSchemaKey::GenerateReplacementHash() {
36 | m_salt += 1;
37 | return ComputeHash();
38 | }
39 |
40 | } // namespace data_buffer
41 | } // namespace client
42 |
43 | } // namespace bosdyn
44 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/data_buffer/signal_schema_key.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | namespace data_buffer {
19 |
20 | class SignalSchemaKey {
21 | public:
22 | SignalSchemaKey(const std::string& client_name, const std::string& serialized_schema)
23 | : m_client_name(client_name), m_serialized_schema(serialized_schema) {
24 | ComputeHash();
25 | }
26 | ~SignalSchemaKey() = default;
27 |
28 | const std::string& ClientName() const { return m_client_name; }
29 | const std::string& SerializedSchema() const { return m_serialized_schema; }
30 |
31 | bool IsEquivalent(const SignalSchemaKey& other) const {
32 | return ClientName() == other.ClientName() && SerializedSchema() == other.SerializedSchema();
33 | }
34 |
35 | // Hashed value for this key.
36 | uint64_t Hash() const { return m_hash; }
37 |
38 | // We generally want the same key and serialized scheme to result in the same key id,
39 | // but in the unlikely case that we ever get the same hashed value as another key
40 | // with different client name and serialized schema, we can increment the salt value
41 | // and compute a new key for a given registration.
42 | uint64_t GenerateReplacementHash();
43 |
44 | protected:
45 | uint64_t ComputeHash();
46 |
47 | private:
48 | const std::string m_client_name;
49 | const std::string m_serialized_schema;
50 | uint64_t m_salt = 0;
51 | uint64_t m_hash = 0;
52 | };
53 |
54 | } // namespace data_buffer
55 |
56 | } // namespace client
57 |
58 | } // namespace bosdyn
59 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/directory_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/directory/directory_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(GetServiceEntryResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/directory_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(GetServiceEntryResponse_Status)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/directory_helpers.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "directory_helpers.h"
11 |
12 | #include "bosdyn/client/error_codes/directory_helper_error_code.h"
13 | #include "bosdyn/client/sdk/client_sdk.h"
14 |
15 | namespace bosdyn {
16 |
17 | namespace client {
18 |
19 |
20 | } // namespace client
21 |
22 | } // namespace bosdyn
23 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/directory_helpers.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 |
12 | #include "directory_client.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 |
19 |
20 | } // namespace client
21 |
22 | } // namespace bosdyn
23 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/util.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "util.h"
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 | namespace directory {
18 | namespace util {
19 |
20 | ::bosdyn::api::Endpoint MakeEndpoint(const std::string& host_name, const int grpc_port) {
21 | ::bosdyn::api::Endpoint endpoint;
22 | endpoint.set_host_ip(host_name);
23 | endpoint.set_port(grpc_port);
24 | return endpoint;
25 | }
26 |
27 | } // namespace util
28 | } // namespace directory
29 | } // namespace client
30 |
31 | } // namespace bosdyn
32 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory/util.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | #include
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 | namespace directory {
20 | namespace util {
21 |
22 | /// Create a service endpoint object.
23 | ::bosdyn::api::Endpoint MakeEndpoint(const std::string& host_name, int grpc_port);
24 |
25 | } // namespace util
26 | } // namespace directory
27 | } // namespace client
28 |
29 | } // namespace bosdyn
30 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory_registration/directory_registration_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/directory_registration/directory_registration_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RegisterServiceResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(UnregisterServiceResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(UpdateServiceResponse_Status, valcode == 1)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/directory_registration/directory_registration_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RegisterServiceResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(UnregisterServiceResponse_Status)
17 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(UpdateServiceResponse_Status)
18 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/docking/docking_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/docking/docking_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_DOCKING(DockingCommandResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/docking/docking_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_DOCKING(DockingCommandResponse_Status)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/client_creation_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | enum class ClientCreationErrorCode {
15 | Success = 0,
16 | IncorrectServiceType = 1,
17 | UnregisteredService = 2,
18 | };
19 |
20 | namespace std {
21 | template <>
22 | struct is_error_code_enum : true_type {};
23 | } // namespace std
24 |
25 | std::error_code make_error_code(ClientCreationErrorCode);
26 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/directory_helper_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | enum class DirectoryHelperErrorCode {
15 | NonExistentServiceName = 1,
16 | };
17 |
18 | namespace std {
19 | template <>
20 | struct is_error_code_enum : true_type {};
21 | } // namespace std
22 |
23 | std::error_code make_error_code(DirectoryHelperErrorCode);
24 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/docking_helper_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | // Can these be more general than docking errors?
15 | enum class DockingHelperErrorCode {
16 | // The task could not complete within the given number of attempts.
17 | RetriesExceeded = 1,
18 | // Something else cancelled the process.
19 | Cancelled = 2,
20 | // A single docking command failed.
21 | CommandFailed = 3,
22 | };
23 |
24 | namespace std {
25 | template <>
26 | struct is_error_code_enum : true_type {};
27 | } // namespace std
28 |
29 | std::error_code make_error_code(DockingHelperErrorCode);
30 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/error_type_condition.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 |
12 | #include "bosdyn/client/error_codes/error_type_condition.h"
13 | #include "bosdyn/client/error_codes/rpc_error_code.h"
14 | #include "bosdyn/client/error_codes/sdk_error_code.h"
15 |
16 | namespace { // anonymous namespace
17 |
18 | struct ErrorTypeConditionCategory : std::error_category {
19 | const char* name() const noexcept override;
20 | std::string message(int ev) const override;
21 | };
22 |
23 | const char* ErrorTypeConditionCategory::name() const noexcept { return "ErrorTypeCondition"; }
24 |
25 | std::string ErrorTypeConditionCategory::message(int value) const {
26 | switch (static_cast(value)) {
27 | case ErrorTypeCondition::ResponseError:
28 | return "ResponseError";
29 | case ErrorTypeCondition::RPCError:
30 | return "RPCError";
31 | case ErrorTypeCondition::SDKError:
32 | return "SDKError";
33 | }
34 | return "(ErrorTypeCondition: unrecognized error)";
35 | }
36 | const ErrorTypeConditionCategory ErrorTypeConditionCategory_category{};
37 |
38 | } // anonymous namespace
39 |
40 | std::error_condition make_error_condition(ErrorTypeCondition value) {
41 | return {static_cast(value), ErrorTypeConditionCategory_category};
42 | }
43 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/error_type_condition.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | enum class ErrorTypeCondition {
15 | // no 0
16 | ResponseError = 1,
17 | RPCError = 2,
18 | SDKError = 3,
19 | };
20 |
21 | namespace std {
22 | template <>
23 | struct is_error_condition_enum : true_type {};
24 | } // namespace std
25 |
26 | std::error_condition make_error_condition(ErrorTypeCondition);
27 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/header_error_code.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "header_error_code.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(CommonError_Code, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/header_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 | #include
12 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
13 |
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(CommonError_Code)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/joint_control_stream_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | // Need to be more specific or removed when streaming client is changed to use general form as we
15 | // did in other clients.
16 | enum class JointControlStreamErrorCode {
17 | // Success
18 | Success = 0,
19 | // Getting request_writer failed
20 | RequestWriterFailed = 1,
21 | // Getting response reader failed
22 | ResponseReaderFailed = 2,
23 | // Streaming for joint control failed
24 | StreamingFailed = 3,
25 | };
26 |
27 | namespace std {
28 | template <>
29 | struct is_error_code_enum : true_type {};
30 | } // namespace std
31 |
32 | std::error_code make_error_code(JointControlStreamErrorCode);
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/lease_wallet_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | enum class LeaseWalletErrorCode {
19 | Success = 0,
20 | ResourceNotInWalletError = 1,
21 | ResourceNotOwnedError = 2,
22 | LeaseInvalidError = 3,
23 | GenericLeaseError = 4
24 | };
25 |
26 | const std::error_category& LeaseWalletErrorCategory();
27 | std::error_code make_error_code(LeaseWalletErrorCode);
28 |
29 | } // namespace client
30 |
31 | } // namespace bosdyn
32 |
33 | namespace std {
34 | template <>
35 | struct is_error_code_enum : true_type {};
36 | } // namespace std
37 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/rpc_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include "bosdyn/common/status.h"
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | enum class RPCErrorCode {
21 | Success = 0,
22 | ClientCancelledOperationError = 1,
23 | InvalidAppTokenError = 2,
24 | InvalidClientCertificateError = 3,
25 | NonexistentAuthorityError = 4,
26 | PermissionDeniedError = 5,
27 | ProxyConnectionError = 6,
28 | ResponseTooLargeError = 7,
29 | ServiceUnavailableError = 8,
30 | ServiceFailedDuringExecutionError = 9,
31 | TimedOutError = 10,
32 | UnableToConnectToRobotError = 11,
33 | UnauthenticatedError = 12,
34 | UnknownDnsNameError = 13,
35 | UnimplementedError = 14,
36 | TransientFailureError = 15,
37 | TooManyRequestsError = 16,
38 | NotFoundError = 17,
39 | RetryableUnavailableError = 18,
40 | };
41 |
42 | const std::error_category& RPCErrorCategory();
43 |
44 | std::error_code make_error_code(RPCErrorCode);
45 |
46 | ::bosdyn::common::Status ConvertGRPCStatus(const grpc::Status& status);
47 |
48 | } // namespace client
49 | } // namespace bosdyn
50 |
51 | enum class RetryableRPCCondition {
52 | // no 0
53 | Retryable = 1,
54 | Persistent = 2,
55 | };
56 |
57 | namespace std {
58 | template <>
59 | struct is_error_code_enum<::bosdyn::client::RPCErrorCode> : true_type {};
60 |
61 | template <>
62 | struct is_error_condition_enum : true_type {};
63 | } // namespace std
64 |
65 | std::error_condition make_error_condition(RetryableRPCCondition);
66 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/sdk_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | enum class SDKErrorCode {
19 | Success = 0,
20 | GenericSDKError = 3,
21 | };
22 |
23 | std::error_code make_error_code(SDKErrorCode);
24 |
25 | } // namespace client
26 |
27 | } // namespace bosdyn
28 |
29 | namespace std {
30 | template <>
31 | struct is_error_code_enum<::bosdyn::client::SDKErrorCode> : true_type {};
32 | } // namespace std
33 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/error_codes/time_sync_helper_error_code.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | enum class TimeSyncHelperErrorCode {
19 | ClockIdentifierUnset = 1,
20 | };
21 |
22 | enum class EstablishTimeSyncErrorCode {
23 | UnableToEstablishTimeSync = 1,
24 | };
25 |
26 | enum class RobotTimeSyncErrorCode {
27 | PreviousTimeSyncUnavailableYet = 1,
28 | };
29 |
30 | std::error_code make_error_code(TimeSyncHelperErrorCode);
31 | std::error_code make_error_code(EstablishTimeSyncErrorCode);
32 | std::error_code make_error_code(RobotTimeSyncErrorCode);
33 |
34 | } // namespace client
35 | } // namespace bosdyn
36 |
37 | namespace std {
38 | template <>
39 | struct is_error_code_enum : true_type {};
40 | template <>
41 | struct is_error_code_enum : true_type {};
42 | template <>
43 | struct is_error_code_enum : true_type {};
44 | } // namespace std
45 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/estop/estop_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/estop/estop_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(EstopCheckInResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RegisterEstopEndpointResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(DeregisterEstopEndpointResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(SetEstopConfigResponse_Status, valcode == 1)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/estop/estop_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(EstopCheckInResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RegisterEstopEndpointResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(DeregisterEstopEndpointResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(SetEstopConfigResponse_Status)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/fault/fault_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/fault/fault_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(TriggerServiceFaultResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ClearServiceFaultResponse_Status, valcode == 1)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/fault/fault_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(TriggerServiceFaultResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ClearServiceFaultResponse_Status)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/graph_nav/graph_nav_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/graph_nav/graph_nav_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | // Accept STATUS_UNKNOWN (code was introduced in 3.1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(ClearGraphResponse_Status, valcode == 1 || valcode == 0)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(SetLocalizationResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(NavigateRouteResponse_Status, valcode == 1)
17 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(NavigateToResponse_Status, valcode == 1)
18 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(NavigateToAnchorResponse_Status, valcode == 1)
19 | // NOTE: NavigationFeedbackResponse is not converted to std::error_code on purpose.
20 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(DownloadWaypointSnapshotResponse_Status, valcode == 1)
21 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(DownloadEdgeSnapshotResponse_Status, valcode == 1)
22 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(UploadWaypointSnapshotResponse_Status, valcode == 1)
23 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(UploadGraphResponse_Status, valcode == 1)
24 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/graph_nav/graph_nav_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(ClearGraphResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(SetLocalizationResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(NavigateRouteResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(NavigateToResponse_Status)
17 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(NavigateToAnchorResponse_Status)
18 | // NOTE: NavigationFeedbackResponse is not converted to std::error_code on purpose.
19 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(DownloadWaypointSnapshotResponse_Status)
20 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(DownloadEdgeSnapshotResponse_Status)
21 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(UploadWaypointSnapshotResponse_Status)
22 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(UploadGraphResponse_Status)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/graph_nav/recording_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/graph_nav/recording_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(StartRecordingResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(StopRecordingResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(CreateWaypointResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_GRAPHNAV(CreateEdgeResponse_Status, valcode == 1)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/graph_nav/recording_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(StartRecordingResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(StopRecordingResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(CreateWaypointResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_GRAPHNAV(CreateEdgeResponse_Status)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/image/image_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/image/image_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ImageResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/image/image_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ImageResponse_Status)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/inverse_kinematics/inverse_kinematics_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/inverse_kinematics/inverse_kinematics_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_SPOT(InverseKinematicsResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/inverse_kinematics/inverse_kinematics_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_SPOT(InverseKinematicsResponse_Status)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/keepalive/keepalive_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/keepalive/keepalive_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_KEEPALIVE(ModifyPolicyResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_KEEPALIVE(CheckInResponse_Status, valcode == 1)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/keepalive/keepalive_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_KEEPALIVE(ModifyPolicyResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_KEEPALIVE(CheckInResponse_Status)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/lease/lease_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/lease/lease_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(LeaseUseResult_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(AcquireLeaseResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(TakeLeaseResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ReturnLeaseResponse_Status, valcode == 1)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/lease/lease_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(LeaseUseResult_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(AcquireLeaseResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(TakeLeaseResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ReturnLeaseResponse_Status)
--------------------------------------------------------------------------------
/cpp/bosdyn/client/lease/lease_resources.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | // The different resource names that are managed by the lease system. Resources
19 | // are tracked in a hierarchy, with leaf resources and parent resources which encompass
20 | // control of multiple parts of the robot.
21 |
22 | // Parent resources.
23 | const std::string kBodyResource = "body";
24 | const std::string kFullArmResource = "full-arm";
25 |
26 | // Leaf resources.
27 | const std::string kArmResource = "arm";
28 | const std::string kGripperResource = "gripper";
29 | const std::string kMobilityResource = "mobility";
30 | const std::string kFanResource = "fan";
31 |
32 | } // namespace client
33 |
34 | } // namespace bosdyn
35 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/local_grid/local_grid_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/local_grid/local_grid_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(LocalGridResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/local_grid/local_grid_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(LocalGridResponse_Status)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/log_status/log_status_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 |
11 | #include "bosdyn/client/log_status/log_status_error_codes.h"
12 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
13 |
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(GetLogStatusResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(GetActiveLogStatusesResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(StartExperimentLogResponse_Status, valcode == 1)
17 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(StartRetroLogResponse_Status, valcode == 1)
18 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(UpdateExperimentLogResponse_Status, valcode == 1)
19 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_LOG_STATUS(TerminateLogResponse_Status, valcode == 1)
20 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/log_status/log_status_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 |
11 | #include "bosdyn/api/log_status/log_status.pb.h"
12 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
13 |
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(GetLogStatusResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(GetActiveLogStatusesResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(StartExperimentLogResponse_Status)
17 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(StartRetroLogResponse_Status)
18 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(UpdateExperimentLogResponse_Status)
19 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_LOG_STATUS(TerminateLogResponse_Status)
20 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/mission/mission_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/mission/mission_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_MISSION(PauseMissionResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_MISSION(LoadMissionResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_MISSION(PlayMissionResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_MISSION(RestartMissionResponse_Status, valcode == 1)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/mission/mission_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_MISSION(PauseMissionResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_MISSION(LoadMissionResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_MISSION(PlayMissionResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_MISSION(RestartMissionResponse_Status)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/network_compute_bridge/network_compute_bridge_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/network_compute_bridge//network_compute_bridge_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(NetworkComputeStatus, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ListAvailableModelsStatus, valcode == 1)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/network_compute_bridge/network_compute_bridge_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(NetworkComputeStatus)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ListAvailableModelsStatus)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/payload_registration/payload_registration_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/payload_registration/payload_registration_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RegisterPayloadResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(UpdatePayloadVersionResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(GetPayloadAuthTokenResponse_Status, valcode == 1)
16 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(UpdatePayloadAttachedResponse_Status, valcode == 1)
17 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/payload_registration/payload_registration_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RegisterPayloadResponse_Status)
16 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(UpdatePayloadVersionResponse_Status)
17 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(GetPayloadAuthTokenResponse_Status)
18 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(UpdatePayloadAttachedResponse_Status)
19 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/point_cloud/point_cloud_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/point_cloud/point_cloud_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(PointCloudResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/point_cloud/point_cloud_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(PointCloudResponse_Status)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/power/power_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/power/power_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(PowerCommandStatus, valcode == 1 || valcode == 2)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(FanPowerCommandResponse_Status, valcode == 1)
15 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ResetSafetyStopResponse_Status, valcode == 1)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/power/power_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(PowerCommandStatus)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(FanPowerCommandResponse_Status)
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ResetSafetyStopResponse_Status)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/app_token_request_processor.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "app_token_request_processor.h"
11 | #include "bosdyn/client/error_codes/sdk_error_code.h"
12 |
13 | namespace bosdyn {
14 |
15 | namespace client {
16 |
17 | AppTokenRequestProcessor::AppTokenRequestProcessor(const std::string& app_token)
18 | : m_app_token(app_token) {}
19 |
20 | ::bosdyn::common::Status AppTokenRequestProcessor::Process(
21 | grpc::ClientContext* context, ::bosdyn::api::RequestHeader* request_header,
22 | ::google::protobuf::Message* full_request) {
23 | context->AddMetadata("x-bosdyn-apptoken", m_app_token);
24 | return ::bosdyn::common::Status(SDKErrorCode::Success);
25 | }
26 |
27 | } // namespace client
28 |
29 | } // namespace bosdyn
30 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/app_token_request_processor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "request_processor.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | class AppTokenRequestProcessor : public RequestProcessor {
19 | public:
20 | explicit AppTokenRequestProcessor(const std::string& app_token);
21 | ~AppTokenRequestProcessor() = default;
22 |
23 | private:
24 | ::bosdyn::common::Status Process(grpc::ClientContext* context,
25 | ::bosdyn::api::RequestHeader* request_header,
26 | ::google::protobuf::Message* full_request);
27 |
28 | std::string m_app_token;
29 | };
30 |
31 | } // namespace client
32 |
33 | } // namespace bosdyn
34 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/common_request_processor.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "common_request_processor.h"
11 |
12 | #include
13 |
14 | #include "bosdyn/client/error_codes/sdk_error_code.h"
15 | #include "bosdyn/common/compiler_definitions.h"
16 | #include "bosdyn/common/time.h"
17 |
18 | namespace bosdyn {
19 |
20 | namespace client {
21 |
22 | CommonRequestProcessor::CommonRequestProcessor(const std::string& client_name)
23 | : m_client_name(client_name) {}
24 |
25 | ::bosdyn::common::Status CommonRequestProcessor::Process(
26 | grpc::ClientContext* context BOSDYN_UNUSED, ::bosdyn::api::RequestHeader* request_header,
27 | ::google::protobuf::Message* full_request BOSDYN_UNUSED) {
28 | request_header->set_client_name(m_client_name);
29 | ::bosdyn::common::SetTimestamp(::bosdyn::common::NowNsec(),
30 | request_header->mutable_request_timestamp());
31 | return ::bosdyn::common::Status(SDKErrorCode::Success);
32 | }
33 |
34 | } // namespace client
35 |
36 | } // namespace bosdyn
37 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/common_request_processor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "request_processor.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | // RequestHeaderCreator sets common RequestHeaders. These RequestHeaders are included in most Boston
19 | // Dynamics API RPCs.
20 | class CommonRequestProcessor : public RequestProcessor {
21 | public:
22 | // Constructs a RequestHeaderCreator. |client_name| will be set in each header, and ideally
23 | // contains both a string identifying a particular binary, as well as an instance of a binary
24 | // (such as a PID or GUID).
25 | explicit CommonRequestProcessor(const std::string& client_name);
26 | ~CommonRequestProcessor() = default;
27 |
28 | ::bosdyn::common::Status Process(grpc::ClientContext* context,
29 | ::bosdyn::api::RequestHeader* request_header,
30 | ::google::protobuf::Message* full_request) override;
31 |
32 | private:
33 | std::string m_client_name;
34 | };
35 |
36 | } // namespace client
37 |
38 | } // namespace bosdyn
39 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/common_response_processor.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "common_response_processor.h"
11 | #include "bosdyn/client/error_codes/header_error_code.h"
12 | #include "bosdyn/client/error_codes/sdk_error_code.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | ::bosdyn::common::Status CommonResponseProcessor::Process(
19 | const grpc::Status& status, const ::bosdyn::api::ResponseHeader& response_header,
20 | const ::google::protobuf::Message& full_response) {
21 | const ::bosdyn::api::CommonError& error = response_header.error();
22 | return ::bosdyn::common::Status(error.code(), error.message());
23 | }
24 |
25 | } // namespace client
26 |
27 | } // namespace bosdyn
28 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/common_response_processor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "response_processor.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | // ResponseHeaderProcessor handles common gRPC response information used across most of the Boston
19 | // Dynamics API.
20 | //
21 | // API client code will typically have the ResponseHeaderProcess process a response first, followed
22 | // by RPC-specific handling.
23 | class CommonResponseProcessor : public ResponseProcessor {
24 | public:
25 | CommonResponseProcessor() = default;
26 | ~CommonResponseProcessor() = default;
27 |
28 | ::bosdyn::common::Status Process(const grpc::Status& status,
29 | const ::bosdyn::api::ResponseHeader& response_header,
30 | const ::google::protobuf::Message& full_response) override;
31 | };
32 |
33 | } // namespace client
34 |
35 | } // namespace bosdyn
36 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/request_processor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include "bosdyn/common/status.h"
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | // RequestProcessors process gRPC requests before the requests are actually issued over the wire.
21 | //
22 | // Implementations MUST be thread-safe.
23 | class RequestProcessor {
24 | public:
25 | virtual ~RequestProcessor() = default;
26 |
27 | // Process a request before it is sent over the wire.
28 | virtual ::bosdyn::common::Status Process(grpc::ClientContext* context,
29 | ::bosdyn::api::RequestHeader* request_header,
30 | ::google::protobuf::Message* full_request) = 0;
31 | };
32 |
33 | } // namespace client
34 |
35 | } // namespace bosdyn
36 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/request_processor_chain.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "request_processor_chain.h"
11 | #include "request_processor.h"
12 | #include "bosdyn/client/error_codes/sdk_error_code.h"
13 | #include "bosdyn/common/assert_precondition.h"
14 |
15 | namespace bosdyn {
16 |
17 | namespace client {
18 |
19 | void RequestProcessorChain::AppendProcessor(const std::shared_ptr& processor) {
20 | // Cannot have a null request processor.
21 | BOSDYN_ASSERT_PRECONDITION(processor, "Cannot append a null request processor.");
22 | m_processors.push_back(processor);
23 | }
24 |
25 | void RequestProcessorChain::PrependProcessor(const std::shared_ptr& processor) {
26 | // Cannot have a null request processor.
27 | BOSDYN_ASSERT_PRECONDITION(processor, "Cannot append a null request processor.");
28 | m_processors.push_front(processor);
29 | }
30 |
31 | ::bosdyn::common::Status RequestProcessorChain::Process(
32 | grpc::ClientContext* context, ::bosdyn::api::RequestHeader* request_header,
33 | ::google::protobuf::Message* full_request) {
34 | ::bosdyn::common::Status status = ::bosdyn::common::Status(SDKErrorCode::Success);
35 | for (const auto& processor : m_processors) {
36 | status = processor->Process(context, request_header, full_request);
37 | if (!status) {
38 | // Stop after the first detected error
39 | return status;
40 | }
41 | }
42 | return status;
43 | }
44 |
45 | } // namespace client
46 |
47 | } // namespace bosdyn
48 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/request_processor_chain.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include
15 | #include "bosdyn/common/status.h"
16 |
17 | namespace google {
18 | namespace protobuf {
19 | class Message;
20 | }
21 | } // namespace google
22 |
23 | namespace bosdyn {
24 |
25 | namespace client {
26 |
27 | namespace api {
28 | class RequestHeader;
29 | }
30 |
31 | class RequestProcessor;
32 |
33 | class RequestProcessorChain {
34 | public:
35 | RequestProcessorChain() = default;
36 | RequestProcessorChain(const RequestProcessorChain& other) = default;
37 | ~RequestProcessorChain() = default;
38 |
39 | RequestProcessorChain& operator=(const RequestProcessorChain& other) = default;
40 |
41 | void AppendProcessor(const std::shared_ptr& processor);
42 |
43 | void PrependProcessor(const std::shared_ptr& processor);
44 |
45 | // Run all processors over a new request.
46 | ::bosdyn::common::Status Process(grpc::ClientContext* context,
47 | ::bosdyn::api::RequestHeader* request_header,
48 | ::google::protobuf::Message* full_request);
49 |
50 | private:
51 | std::list> m_processors;
52 | };
53 |
54 | } // namespace client
55 |
56 | } // namespace bosdyn
57 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/response_processor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include "bosdyn/common/status.h"
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | // ResponseProcessors process gRPC responses after they are received, but before ServiceClient
21 | // specific handling happens.
22 | //
23 | // Implementations MUST be thread-safe.
24 | class ResponseProcessor {
25 | public:
26 | virtual ~ResponseProcessor() = default;
27 |
28 | virtual ::bosdyn::common::Status Process(const grpc::Status& status,
29 | const ::bosdyn::api::ResponseHeader& response_header,
30 | const ::google::protobuf::Message& full_response) = 0;
31 | };
32 |
33 | } // namespace client
34 |
35 | } // namespace bosdyn
36 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/response_processor_chain.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "response_processor_chain.h"
11 | #include "response_processor.h"
12 | #include "bosdyn/client/error_codes/sdk_error_code.h"
13 | #include "bosdyn/common/assert_precondition.h"
14 |
15 | namespace bosdyn {
16 |
17 | namespace client {
18 |
19 | void ResponseProcessorChain::AppendProcessor(const std::shared_ptr& processor) {
20 | // Cannot have a null response processor.
21 | BOSDYN_ASSERT_PRECONDITION(processor, "Cannot append a null response processor.");
22 | m_processors.push_back(processor);
23 | }
24 |
25 | void ResponseProcessorChain::PrependProcessor(const std::shared_ptr& processor) {
26 | // Cannot have a null response processor.
27 | BOSDYN_ASSERT_PRECONDITION(processor, "Cannot prepend a null response processor.");
28 | m_processors.push_front(processor);
29 | }
30 |
31 | ::bosdyn::common::Status ResponseProcessorChain::Process(
32 | const grpc::Status& status, const ::bosdyn::api::ResponseHeader& response_header,
33 | const ::google::protobuf::Message& full_response) {
34 | ::bosdyn::common::Status ret_status = ::bosdyn::common::Status(SDKErrorCode::Success);
35 | for (const auto& processor : m_processors) {
36 | ret_status = processor->Process(status, response_header, full_response);
37 | if (!ret_status) {
38 | // Stop after the first detected error
39 | return ret_status;
40 | }
41 | }
42 | return ret_status;
43 | }
44 |
45 | } // namespace client
46 |
47 | } // namespace bosdyn
48 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/processors/response_processor_chain.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include
15 | #include "bosdyn/common/status.h"
16 |
17 | namespace grpc {
18 | class Status;
19 | }
20 |
21 | namespace google {
22 | namespace protobuf {
23 | class Message;
24 | }
25 | } // namespace google
26 |
27 | namespace bosdyn {
28 |
29 | namespace client {
30 |
31 | namespace api {
32 | class ResponseHeader;
33 | }
34 |
35 | class ResponseProcessor;
36 |
37 | class ResponseProcessorChain {
38 | public:
39 | ResponseProcessorChain() = default;
40 | ResponseProcessorChain(const ResponseProcessorChain& other) = default;
41 | ~ResponseProcessorChain() = default;
42 |
43 | ResponseProcessorChain& operator=(const ResponseProcessorChain& other) = default;
44 |
45 | void AppendProcessor(const std::shared_ptr& processor);
46 |
47 | void PrependProcessor(const std::shared_ptr& processor);
48 |
49 | ::bosdyn::common::Status Process(const grpc::Status& status,
50 | const ::bosdyn::api::ResponseHeader& response_header,
51 | const ::google::protobuf::Message& full_response);
52 |
53 | private:
54 | std::list> m_processors;
55 | };
56 |
57 | } // namespace client
58 |
59 | } // namespace bosdyn
60 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot/token_cache.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | namespace bosdyn {
13 |
14 | namespace client {
15 |
16 | class TokenCache {
17 | public:
18 | TokenCache() = default;
19 | ~TokenCache() = default;
20 |
21 | std::string Read(const std::string& /*name*/) { return ""; }
22 |
23 | void clear(const std::string& /*name*/) {}
24 |
25 | void write(const std::string& /*name*/, const std::string& /*token*/) {}
26 |
27 | std::vector match(const std::string& /*name*/) {
28 | return std::vector();
29 | }
30 | };
31 |
32 | } // namespace client
33 |
34 | } // namespace bosdyn
35 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot/token_manager.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "token_manager.h"
11 |
12 |
13 | namespace bosdyn {
14 |
15 | namespace client {
16 |
17 | TokenManager::TokenManager(Robot* robot, ::bosdyn::common::Duration refresh_interval)
18 | : m_robot(robot),
19 | m_refresh_thread_is_alive(true),
20 | m_user_token_refresh_interval(refresh_interval) {
21 | m_refresh_thread = std::thread(&TokenManager::Update, this);
22 | }
23 |
24 | TokenManager::~TokenManager() { Stop(); }
25 |
26 | void TokenManager::Stop() {
27 | {
28 | std::lock_guard lock(this->m_refresh_mutex);
29 | m_refresh_thread_is_alive = false;
30 | }
31 | m_cv.notify_one();
32 | m_refresh_thread.join();
33 | }
34 |
35 | bool TokenManager::WaitForInterval() {
36 | std::unique_lock lock(m_refresh_mutex);
37 | if (!m_refresh_thread_is_alive) return false;
38 | return !m_cv.wait_for(lock, m_user_token_refresh_interval,
39 | [this]() { return !m_refresh_thread_is_alive; });
40 | }
41 |
42 | void TokenManager::Update() {
43 | while (WaitForInterval()) {
44 | ::bosdyn::common::Status status = m_robot->AuthenticateWithToken(m_robot->GetUserToken());
45 | if (!status) {
46 | fprintf(stderr, "AuthenticateWithToken failed: '%s'\n", status.DebugString().c_str());
47 | }
48 | }
49 | }
50 |
51 | } // namespace client
52 |
53 | } // namespace bosdyn
54 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot/token_manager.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "robot.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | class Robot; // Forward class declaration to resolve the circular dependency
19 |
20 | class TokenManager {
21 | public:
22 | explicit TokenManager(::bosdyn::client::Robot* robot,
23 | ::bosdyn::common::Duration refresh_interval = std::chrono::seconds(3600));
24 |
25 | ~TokenManager();
26 |
27 | void Stop();
28 |
29 | private:
30 | // Refreshes the user token as needed.
31 | void Update();
32 |
33 | // Wait for the refresh interval and coordinate with the destructor on the condition variable.
34 | bool WaitForInterval();
35 |
36 | ::bosdyn::client::Robot* m_robot;
37 |
38 | // Refresh token thread.
39 | std::thread m_refresh_thread;
40 |
41 | // Lock for the condition variable
42 | std::mutex m_refresh_mutex;
43 |
44 | // Condition Variable for checking if the thread should still be sleeping or be stopped.
45 | std::condition_variable m_cv;
46 |
47 | // Boolean indicating it the thread is still running or if it has returned.
48 | bool m_refresh_thread_is_alive;
49 |
50 | // Duration between token refreshes. This defaults to 1 hour, but can be updated by
51 | // the value passed to the constructor.
52 | ::bosdyn::common::Duration m_user_token_refresh_interval;
53 | };
54 |
55 | } // namespace client
56 |
57 | } // namespace bosdyn
58 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot_command/robot_command_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/robot_command/robot_command_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(RobotCommandResponse_Status, valcode == 1)
14 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(ClearBehaviorFaultResponse_Status, valcode == 1)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot_command/robot_command_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(RobotCommandResponse_Status)
14 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(ClearBehaviorFaultResponse_Status)
15 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot_command/robot_command_streaming_client.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "robot_command_streaming_client.h"
11 |
12 | namespace bosdyn {
13 |
14 | namespace client {
15 |
16 | const char* RobotCommandStreamingClient::s_default_service_name = "robot-command-streaming";
17 |
18 | const char* RobotCommandStreamingClient::s_service_type = "bosdyn.api.RobotCommandStreamingService";
19 |
20 | JointControlStreamResultType RobotCommandStreamingClient::JointControlStream(
21 | const ::bosdyn::api::JointControlStreamRequest& request) {
22 | if (!m_request_writer) {
23 | m_request_writer = m_stub->JointControlStream(&m_context, &m_response);
24 | if (!m_request_writer) {
25 | return {::bosdyn::common::Status(JointControlStreamErrorCode::RequestWriterFailed),
26 | std::move(m_response)};
27 | }
28 | }
29 |
30 | if (!m_request_writer->Write(request)) {
31 | return {::bosdyn::common::Status(JointControlStreamErrorCode::StreamingFailed),
32 | std::move(m_response)};
33 | }
34 |
35 | return {::bosdyn::common::Status(JointControlStreamErrorCode::Success)};
36 | }
37 |
38 | ServiceClient::QualityOfService RobotCommandStreamingClient::GetQualityOfService() const {
39 | return QualityOfService::NORMAL;
40 | }
41 |
42 | void RobotCommandStreamingClient::SetComms(const std::shared_ptr& channel) {
43 | m_stub.reset(new ::bosdyn::api::RobotCommandStreamingService::Stub(channel));
44 | }
45 |
46 | } // namespace client
47 |
48 | } // namespace bosdyn
49 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/robot_state/robot_state_streaming_client.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/robot_state/robot_state_streaming_client.h"
11 |
12 | namespace bosdyn {
13 |
14 | namespace client {
15 |
16 | const char* RobotStateStreamingClient::s_default_service_name = "robot-state-streaming";
17 |
18 | const char* RobotStateStreamingClient::s_service_type = "bosdyn.api.RobotStateStreamingService";
19 |
20 | RobotStateStreamResultType RobotStateStreamingClient::GetRobotStateStream() {
21 | ::bosdyn::api::RobotStateStreamRequest request;
22 | ::bosdyn::api::RobotStateStreamResponse response;
23 | if (!m_response_reader) {
24 | m_response_reader = m_stub->GetRobotStateStream(&m_context, request);
25 | if (!m_response_reader) {
26 | return {::bosdyn::common::Status(JointControlStreamErrorCode::ResponseReaderFailed),
27 | std::move(response)};
28 | }
29 | }
30 |
31 | if (!m_response_reader->Read(&response)) {
32 | return {::bosdyn::common::Status(JointControlStreamErrorCode::StreamingFailed),
33 | std::move(response)};
34 | }
35 | return {::bosdyn::common::Status(JointControlStreamErrorCode::Success), std::move(response)};
36 | }
37 |
38 | ServiceClient::QualityOfService RobotStateStreamingClient::GetQualityOfService() const {
39 | return QualityOfService::NORMAL;
40 | }
41 |
42 | void RobotStateStreamingClient::SetComms(const std::shared_ptr& channel) {
43 | m_stub.reset(new ::bosdyn::api::RobotStateStreamingService::Stub(channel));
44 | }
45 |
46 | } // namespace client
47 | } // namespace bosdyn
--------------------------------------------------------------------------------
/cpp/bosdyn/client/service_client/client_header_handling.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | #include "bosdyn/common/time.h"
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | /// Set the client name and request timestamp in the common header sub-message of the given request
21 | /// message.
22 | ///
23 | /// \param client_name
24 | /// \param[out] req Request of which header should be populated.
25 | template
26 | void SetRequestHeader(const std::string client_name, RequestType* req) {
27 | ::bosdyn::common::SetTimestamp(::bosdyn::common::NowNsec(),
28 | req->mutable_header()->mutable_request_timestamp());
29 | req->mutable_header()->set_client_name(client_name);
30 | }
31 |
32 | } // namespace client
33 |
34 | } // namespace bosdyn
35 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/service_client/common_result_types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include "bosdyn/client/service_client/result.h"
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | typedef Result> StringResultType;
21 |
22 | typedef Result> DurationResultType;
23 |
24 | typedef Result> TimestampResultType;
25 |
26 | } // namespace client
27 |
28 | } // namespace bosdyn
29 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/service_client/result.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "bosdyn/common/status.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | template
19 | struct [[nodiscard]] Result {
20 | ::bosdyn::common::Status status;
21 | ResponseType response;
22 |
23 | // Result can be used directly in if statements to check if it was successful.
24 | operator bool() const { return status; }
25 |
26 | // Conditionally move the response into output, if status == true.
27 | // The Result should not be used after calling this function, as the status and response
28 | // may have been moved away.
29 | ::bosdyn::common::Status&& move_to(ResponseType* output) {
30 | if (status) *output = std::move(response);
31 | return std::move(status);
32 | }
33 |
34 | // Helper for moving out the response.
35 | // Usage example:
36 | // auto result = function_that_returns_result();
37 | // if (result){
38 | // auto value = result.move();
39 | // ... use value here ...
40 | // }
41 | //
42 | // The Result should not be used after calling this function, as the response
43 | // may have been moved away.
44 | ResponseType&& move() { return std::move(response); }
45 |
46 | // Used to explicitly ignore any error present to silence nodiscard warnings.
47 | inline void IgnoreError() const {}
48 | };
49 |
50 | } // namespace client
51 |
52 | } // namespace bosdyn
53 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/service_client/rpc_parameters.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 | #include "bosdyn/common/time.h"
12 |
13 | namespace bosdyn {
14 |
15 | namespace client {
16 |
17 | // For client requests, parameters of this type can request that logging of GRPC request
18 | // and response messages are disabled.
19 | enum class LogRequestMode {
20 | kDisabled = 0,
21 | kEnabled = 1,
22 | kDefault = 2,
23 | };
24 |
25 |
26 | // Specifying the timeout defined below means the RPC timeout is not set and the default timeout
27 | // value specified in the service client will be used.
28 | const ::bosdyn::common::Duration kRPCTimeoutNotSpecified = std::chrono::milliseconds(-1);
29 |
30 | // Default timeout used for all RPCs in the service clients. The Robot or each client can change
31 | // this value in their own instantiation.
32 | const ::bosdyn::common::Duration kDefaultRPCTimeout = std::chrono::seconds(30);
33 |
34 | struct RPCParameters {
35 | // kDefault means that the field disable_rpc_logging in the message headers will keep the
36 | // default proto value.
37 | LogRequestMode logging_control = LogRequestMode::kDefault;
38 |
39 | // kRPCTimeoutNotSpecified is used when timeout is not specified, meaning the default value
40 | // specified in ServiceClient will be used.
41 | ::bosdyn::common::Duration timeout = kRPCTimeoutNotSpecified;
42 |
43 | };
44 |
45 | } // namespace client
46 |
47 | } // namespace bosdyn
48 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/audio/audio_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/audio/audio_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/audio/audio_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/compositor/compositor_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/compositor/compositor_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/compositor/compositor_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/health/health_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/health/health_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/health/health_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/lighting/lighting_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/lighting/lighting_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/lighting/lighting_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/media_log/media_log_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/media_log/media_log_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/media_log/media_log_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include
12 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
13 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/network/network_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/network/network_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/network/network_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/power/power_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/power/power_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/power/power_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/ptz/ptz_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/ptz/ptz_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/ptz/ptz_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/version/version_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/spot_cam/version/version_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/spot_cam/version/version_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/time_sync/time_sync_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/time_sync/time_sync_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(TimeSyncState_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/time_sync/time_sync_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
14 |
15 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(TimeSyncState_Status)
16 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/util/cli_util.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/util/cli_util.h"
11 | #include
12 | #include "bosdyn/common/status.h"
13 |
14 | namespace bosdyn {
15 |
16 | namespace client {
17 |
18 | void AddBaseArguments(CLI::App& parser, std::string& hostname) {
19 | parser.add_option("hostname", hostname, "Hostname or IP of the robot.");
20 | }
21 |
22 | void AddCommonArguments(CLI::App& parser, CommonCLIArgs& args) {
23 | AddBaseArguments(parser, args.hostname);
24 | parser.add_option("--username", args.username, "Username to authenticate with the robot.")
25 | ->envname("BOSDYN_CLIENT_USERNAME");
26 | parser.add_option("--password", args.password, "Password to authenticate with the robot.")
27 | ->envname("BOSDYN_CLIENT_PASSWORD");
28 | }
29 |
30 |
31 | } // namespace client
32 |
33 | } // namespace bosdyn
34 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/util/cli_util.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include "bosdyn/client/robot/robot.h"
13 |
14 | #include
15 |
16 | namespace bosdyn {
17 |
18 | namespace client {
19 |
20 | struct CommonCLIArgs {
21 | std::string hostname;
22 | std::string username;
23 | std::string password;
24 | };
25 |
26 | /**
27 | * Add base command-line arguments.
28 | *
29 | * @param parser(CLI::App): CLI11 App parser where to add the options.
30 | * @param hostname(std::string): Hostname variable mapped to CLI option
31 | */
32 | void AddBaseArguments(CLI::App& parser, std::string& hostname);
33 |
34 | /**
35 | * Add common command-line arguments.
36 | *
37 | * @param parser(CLI::App): CLI11 App parser where to add the options.
38 | * @param args(bosdyn::client::CommonCLIArgs): Variables mapped to CLI11 options.
39 | */
40 | void AddCommonArguments(CLI::App& parser, CommonCLIArgs& args);
41 |
42 |
43 | } // namespace client
44 |
45 | } // namespace bosdyn
46 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/world_objects/world_object_client_error_codes.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/client/world_objects/world_object_client_error_codes.h"
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro_source.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_IMPL_API(MutateWorldObjectResponse_Status, valcode == 1)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/world_objects/world_object_client_error_codes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include
11 | #include "bosdyn/client/error_codes/proto_enum_to_stderror_macro.h"
12 |
13 | DEFINE_PROTO_ENUM_ERRORCODE_HEADER_API(MutateWorldObjectResponse_Status)
14 |
--------------------------------------------------------------------------------
/cpp/bosdyn/client/world_objects/world_object_types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 | namespace api {
16 | // Determines if the given World Object is of the given type (helper).
17 | bool IsWorldObjectOfType(const WorldObject& obj, WorldObjectType type);
18 | // Gets the type of the given World Object (helper).
19 | WorldObjectType GetTypeOfWorldObject(const WorldObject& obj);
20 | } // namespace api
21 | } // namespace bosdyn
--------------------------------------------------------------------------------
/cpp/bosdyn/common/assert_precondition.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #ifdef BOSDYN_DISABLE_ASSERTS
20 | // Disables all bosdyn assert checks.
21 | # define BOSDYN_ASSERT_PRECONDITION(cond, ...) ((void)0)
22 | #else
23 |
24 | /**
25 | * The SDK uses assertions to check pre-conditions required for specific functions to complete
26 | * successfully.
27 | *
28 | * The BOSDYN_ASSERT_PRECONDITION macro will check a condition, and if it is not met then it will
29 | * report the failure and terminate the program.
30 | *
31 | * If arguments are provided after the condition, then the first argument after condition will be
32 | * used as a printf-style format string, and the following arguments will be used as arguments to
33 | * that format string.
34 | */
35 | # define BOSDYN_ASSERT_PRECONDITION(cond, ...) \
36 | (!(cond) ? bosdyn::common::panic(__FUNCTION__, __FILE__, __LINE__, #cond, ##__VA_ARGS__) \
37 | : (void)0)
38 | #endif
39 |
40 | namespace bosdyn {
41 |
42 | namespace common {
43 |
44 | // Logs a formatted error message with additional debug information, then will terminate the
45 | // program.
46 | [[noreturn]] void panic(char const* function, char const* file, int line, const char* cond,
47 | const char* format, ...);
48 |
49 | } // namespace common
50 |
51 | } // namespace bosdyn
52 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/compiler_definitions.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #if defined(__GNUC__) || defined(__clang__)
13 | # define BOSDYN_UNUSED __attribute__((unused))
14 | #else
15 | # define BOSDYN_UNUSED
16 | #endif
17 |
18 | #if defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) || \
19 | defined(__clang__)
20 | # define BOSDYN_CHECK_PRINTF_FORMAT(X) __attribute__((format(printf, (X), 1 + (X))))
21 | #else
22 | // No printf-style format checking for non-GCC/clang compilers
23 | # define BOSDYN_CHECK_PRINTF_FORMAT(X)
24 | #endif
25 |
26 | #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 2))) || \
27 | defined(__clang__)
28 | # define BOSDYN_NONNULL(...) __attribute__((nonnull __VA_ARGS__))
29 | #else
30 | // No nullptr checking for non-GCC/clang compilers
31 | # define BOSDYN_NONNULL(...)
32 | #endif
33 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/int_wrapper.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace common {
17 |
18 | /// A class for wrapping int32 values in a more opaque value, for better type safety.
19 | /// This considers negative values is being invalid.
20 | class Int32Wrapper {
21 | public:
22 | explicit Int32Wrapper(int32_t val) : m_val(val) {}
23 | Int32Wrapper(const Int32Wrapper&) = default;
24 | Int32Wrapper& operator=(const Int32Wrapper&) = default;
25 | int32_t Val() const { return m_val; }
26 | bool IsOk() const { return m_val >= 0; }
27 | bool operator<(const Int32Wrapper& other) const { return m_val < other.Val(); }
28 |
29 | private:
30 | int32_t m_val;
31 | };
32 |
33 | } // namespace common
34 |
35 | } // namespace bosdyn
36 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/mission_filesystem.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | namespace bosdyn {
13 |
14 | namespace common {
15 |
16 | // File containing bosdyn.api.graph_nav.graph proto
17 | const std::string kGraphFile = "graph";
18 |
19 | // File containing bosdyn.api.autowalk.walk proto
20 | // File is in mission directory
21 | // Walks recorded using 3.3 software or later will not default to this name.
22 | const std::string kAutowalkFile = "autogenerated.walk";
23 |
24 | // File containing bosdyn.api.mission.node proto
25 | // File is in mission directory
26 | // Walks recorded using 3.3 software or later will not default to this name.
27 | const std::string kNodeFile = "autogenerated";
28 |
29 | // Autowalk metadata file name
30 | const std::string kAutowalkMetadataFile = "autowalk_metadata";
31 |
32 | // Directory containing waypoint snapshots
33 | const std::string kWaypointSnapshotDir = "waypoint_snapshots";
34 |
35 | // Directory containing edge snapshots
36 | const std::string kEdgeSnapshotDir = "edge_snapshots";
37 |
38 | // Directory containing walk and node files
39 | const std::string kMissionsDir = "missions";
40 |
41 | } // namespace common
42 | } // namespace bosdyn
--------------------------------------------------------------------------------
/cpp/bosdyn/common/numbers.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace common {
17 |
18 | constexpr int64_t kThousand = 1000;
19 | constexpr int64_t kMillion = kThousand * kThousand;
20 | constexpr int64_t kBillion = kMillion * kThousand;
21 | constexpr int64_t kTrillion = kBillion * kThousand;
22 |
23 | constexpr int64_t kBytesPerKB = 1024;
24 | constexpr int64_t kBytesPerMB = 1024 * kBytesPerKB;
25 | constexpr int64_t kBytesPerGB = 1024 * kBytesPerMB;
26 |
27 | constexpr int kSecondsPerMinute = 60;
28 | constexpr int kMinutesPerHour = 60;
29 | constexpr int kHoursPerDay = 24;
30 | constexpr int kDaysPerWeek = 7;
31 |
32 | constexpr int64_t kMsecInSecond = kThousand;
33 | constexpr int64_t kUsecInSecond = kMillion;
34 | constexpr int64_t kNsecInSecond = kBillion;
35 |
36 | constexpr int kSecondsPerHour = kSecondsPerMinute * kMinutesPerHour;
37 | constexpr int kSecondsPerDay = kSecondsPerHour * kHoursPerDay;
38 | constexpr int kSecondsPerWeek = kSecondsPerDay * kDaysPerWeek;
39 |
40 | } // namespace common
41 |
42 | } // namespace bosdyn
43 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/robot_time_converter.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "robot_time_converter.h"
11 |
12 | #include
13 | #include
14 |
15 | #include "bosdyn/common/time.h"
16 |
17 | namespace bosdyn {
18 |
19 | namespace common {
20 |
21 | RobotTimeConverter::RobotTimeConverter(::bosdyn::common::Duration robot_clock_skew) {
22 | m_clock_skew = robot_clock_skew;
23 | }
24 |
25 | ::google::protobuf::Timestamp RobotTimeConverter::RobotTimestampFromLocal(
26 | ::bosdyn::common::TimePoint local_time) {
27 | ::google::protobuf::Timestamp timestamp;
28 | SetTimestamp(local_time.time_since_epoch() + m_clock_skew, ×tamp);
29 | return timestamp;
30 | }
31 |
32 | ::google::protobuf::Timestamp RobotTimeConverter::RobotTimestampFromLocalTimestamp(
33 | ::google::protobuf::Timestamp local_timestamp) {
34 | ::bosdyn::common::TimePoint tp(::bosdyn::common::Duration(TimestampToNsec(local_timestamp)));
35 | return RobotTimestampFromLocal(tp);
36 | }
37 |
38 | } // namespace common
39 |
40 | } // namespace bosdyn
41 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/robot_time_converter.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | #include
15 |
16 | /// These are utilities for use in writing services.
17 | #include "bosdyn/client/service_client/result.h"
18 | #include "bosdyn/common/time.h"
19 |
20 | namespace bosdyn {
21 |
22 | namespace common {
23 |
24 | class RobotTimeConverter {
25 | public:
26 | explicit RobotTimeConverter(::bosdyn::common::Duration robot_clock_skew);
27 |
28 | ::google::protobuf::Timestamp RobotTimestampFromLocal(::bosdyn::common::TimePoint local_time);
29 |
30 | ::google::protobuf::Timestamp RobotTimestampFromLocalTimestamp(
31 | ::google::protobuf::Timestamp local_timestamp);
32 |
33 | ::bosdyn::common::Duration m_clock_skew;
34 | };
35 |
36 | typedef ::bosdyn::client::Result> RobotTimeConverterResultType;
37 |
38 | } // namespace common
39 |
40 | } // namespace bosdyn
41 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/status.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/common/status.h"
11 | #include "bosdyn/common/success_condition.h"
12 |
13 | #include
14 |
15 | namespace bosdyn {
16 |
17 | namespace common {
18 |
19 | Status::Status(const std::error_code& code, std::string message)
20 | : m_code(code), m_message(std::move(message)) {}
21 |
22 | Status Status::Chain(std::string message) const {
23 | message += ": ";
24 | message += m_message;
25 | return Status(m_code, std::move(message));
26 | }
27 |
28 | Status Status::Chain(std::error_code code, std::string message) const {
29 | message += ": ";
30 | message += DebugString();
31 | return Status(code, std::move(message));
32 | }
33 |
34 | std::string Status::DebugString() const {
35 | std::string result = std::to_string(m_code.value());
36 | result += "(";
37 | result += m_code.message();
38 | result += "): ";
39 | result += m_message;
40 | return result;
41 | }
42 |
43 | Status::operator bool() const {
44 | // ::bosdyn::common::Status is the opposite of an std::error_code, meaning if error_code is set
45 | // to success/0, which casts to false, ::bosdyn::common::Status will be set to true. This makes
46 | // it more intuitive if it is used as the return type of a method.
47 | return (m_code == SuccessCondition::Success);
48 | }
49 |
50 | } // namespace common
51 |
52 | } // namespace bosdyn
53 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/string_util.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "string_util.h"
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace common {
17 |
18 | bool EndsWith(const std::string& str, const std::string& end) {
19 | const int str_len = str.length();
20 | const int end_len = end.length();
21 | return end_len <= str_len && str.substr(str_len - end_len) == end;
22 | }
23 |
24 | bool StartsWith(const std::string& str, const std::string& start) {
25 | const int str_len = str.length();
26 | const int start_len = start.length();
27 | return start_len <= str_len && str.substr(0, start_len) == start;
28 | }
29 |
30 | /// If str ends with suffix, return the part preceding, otherwise the original value of str.
31 | std::string RemoveSuffix(const std::string& str, const std::string& suffix) {
32 | return EndsWith(str, suffix) ? str.substr(0, str.length() - suffix.length()) : str;
33 | }
34 |
35 | } // namespace common
36 |
37 | } // namespace bosdyn
38 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/string_util.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | namespace bosdyn {
15 |
16 | namespace common {
17 |
18 | /// Return true if the end of str matches end.
19 | bool EndsWith(const std::string& str, const std::string& end);
20 |
21 | /// Return true if the start of str matches start.
22 | bool StartsWith(const std::string& str, const std::string& start);
23 |
24 | /// If str ends with suffix, return the part preceding, otherwise the original value of str.
25 | std::string RemoveSuffix(const std::string& str, const std::string& suffix);
26 |
27 | } // namespace common
28 |
29 | } // namespace bosdyn
30 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/success_condition.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #include "bosdyn/common/success_condition.h"
11 |
12 | #include
13 |
14 | namespace { // anonymous namespace
15 |
16 | struct SuccessConditionCategory : public std::error_category {
17 | public:
18 | const char* name() const noexcept override;
19 | std::string message(int value) const override;
20 | };
21 |
22 | const char* SuccessConditionCategory::name() const noexcept { return "SuccessCondition"; }
23 |
24 | std::string SuccessConditionCategory::message(int value) const {
25 | switch (static_cast(value)) {
26 | case SuccessCondition::Success:
27 | return "Success";
28 | default:
29 | return "Fail";
30 | }
31 | }
32 |
33 | const SuccessConditionCategory SuccessConditionCategory_category{};
34 |
35 | } // anonymous namespace
36 |
37 | std::error_condition make_error_condition(SuccessCondition value) {
38 | return {static_cast(value), SuccessConditionCategory_category};
39 | }
40 |
--------------------------------------------------------------------------------
/cpp/bosdyn/common/success_condition.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
3 | *
4 | * Downloading, reproducing, distributing or otherwise using the SDK Software
5 | * is subject to the terms and conditions of the Boston Dynamics Software
6 | * Development Kit License (20191101-BDSDK-SL).
7 | */
8 |
9 |
10 | #pragma once
11 |
12 | #include
13 |
14 | enum class SuccessCondition { Success = 0 };
15 |
16 | namespace std {
17 | template <>
18 | struct is_error_condition_enum : true_type {};
19 | } // namespace std
20 |
21 | std::error_condition make_error_condition(SuccessCondition);
22 |
--------------------------------------------------------------------------------
/cpp/bosdyn/math/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Math classes
10 |
11 | The bosdyn/math folder contains common math helper classes and functions.
12 |
13 | ## Main Functionality
14 |
15 | The functionality contained in this folder is:
16 |
17 | - **api_common_frames.h/cpp**: Contains common frame names for SE2 and SE3 Math.
18 | - **frame_helpers.h/cpp**: Helper functions for frame conversions, refer to [Geometry and Frames](https://dev.bostondynamics.com/docs/concepts/geometry_and_frames) high-level documentation for more information.
19 | - **pose_interpolation.h/cpp**: Helper functions for pose interpolations.
20 | - **proto_math.h/cpp**: Helper functions with basic math operations directly on protobufs.
21 |
--------------------------------------------------------------------------------
/cpp/cmake/ProjectConfig.cmake.in:
--------------------------------------------------------------------------------
1 | # Configuration file for @PROJECT_NAME@ library.
2 | # Project specific variables are dynamically inserted
3 | @PACKAGE_INIT@
4 | # add path to installed dependencies to cmake prefix path
5 | list(APPEND CMAKE_PREFIX_PATH @DEP_INSTALL_PATH@)
6 | # Make sure the dependencies are available first
7 | include(CMakeFindDependencyMacro)
8 | find_dependency(Protobuf CONFIG REQUIRED)
9 | find_dependency(Eigen3 CONFIG REQUIRED)
10 | find_dependency(gRPC CONFIG REQUIRED)
11 | find_dependency(CLI11 CONFIG REQUIRED)
12 | find_dependency(Threads REQUIRED)
13 | # Pick up the auto-generated file which knows how to add the library targets
14 | # This will mean that we do not have to supply full paths for the libraries
15 | set(exports_file "${CMAKE_CURRENT_LIST_DIR}/@EXPORTS_FILE@")
16 | if (EXISTS ${exports_file})
17 | message(STATUS "CMake is running ${exports_file}")
18 | include(${exports_file})
19 | endif ()
20 | check_required_components(@PROJECT_NAME@)
21 |
--------------------------------------------------------------------------------
/cpp/examples/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # C++ Examples
10 |
11 | The programming examples included in this directory cover various aspects of the Spot API. Check out each example's README for information on how to run and what the code accomplishes.
12 |
13 | Boston Dynamics recommends completing the [QuickStart guide](../../docs/cpp/quickstart.md) before running examples in order to learn essential concepts for using the SDK.
14 |
15 | ## Contents
16 |
17 | - [Hello Spot Example](hello_spot/README.md)
18 | - [Basic Robot Command Example](basic_robot_command/README.md)
19 | - [Get Image Example](get_image/README.md)
20 | - [SpotCAM PTZ Example](spot_cam/README.md)
21 |
--------------------------------------------------------------------------------
/cpp/examples/arm_grasp_carry_overrides/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # ARM GRASP CARRY OVERRIDES
10 |
11 | This example program sets arm grasp state and carry state overrides while moving the arm around. It demonstrates how to initialize the SDK to talk to the robot and how to command Spot to stand up and
12 | move the arm.
13 |
14 | ## Run the Example
15 |
16 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
17 |
18 | ```
19 | ./arm_grasp_carry_overrides {ROBOT_IP}
20 | ```
21 |
--------------------------------------------------------------------------------
/cpp/examples/arm_manipulation_api_walk_to/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # ARM MANIPULATION API WALK TO
10 |
11 | This example program sends a WalkToObjectRayInWorld command to the robot via the Manipulation API.
12 | It demonstrates how to initialize the SDK to talk to the robot and how to command Spot to stand up
13 | and move towards an object.
14 |
15 | ## Run the Example
16 |
17 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
18 |
19 | ```
20 | ./arm_manipulation_api_walk_to {ROBOT_IP}
21 | ```
22 |
--------------------------------------------------------------------------------
/cpp/examples/basic_robot_command/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # BASIC ROBOT COMMAND
10 |
11 | This example program sends a `Stand` command to the robot. It demonstrates how to initialize the SDK to talk to the robot and how to command Spot to stand up.
12 |
13 | ## Run the Example
14 |
15 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
16 |
17 | ```
18 | ./basic_robot_command {ROBOT_IP}
19 | ```
20 |
--------------------------------------------------------------------------------
/cpp/examples/get_image/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Get Image
10 |
11 | This example program gets various images from the robot cameras by calling the synchronous and asynchronous client methods.
12 |
13 | ## Run the Example
14 |
15 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
16 |
17 | ```
18 | ./get_image {ROBOT_IP}
19 | ```
20 |
--------------------------------------------------------------------------------
/cpp/examples/hello_spot/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Hello Spot
10 |
11 | This example program is the introductory programming example for Spot. It demonstrates how to initialize the SDK to talk to robot and how to get information from the robot services, such as robot id, robot state, list of services running on the robot, and the list of registered payloads. It also logs data to the DataBuffer service.
12 |
13 | ## Understanding Spot Programming
14 |
15 | For your best learning experience, please use the [Quickstart Guide](../../../docs/cpp/quickstart.md) found in the SDK's docs/cpp directory. That will help you get your C++ programming environment set up properly. Then, specifically for Hello Spot, you should look at the [Understanding Spot Programming](../../../docs/python/understanding_spot_programming.md) file. This document walks you through all the commands found in this example!
16 |
17 | ## Run the Example
18 |
19 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
20 |
21 | ```
22 | ./hello_spot {ROBOT_IP}
23 | ```
24 |
--------------------------------------------------------------------------------
/cpp/examples/inverse_kinematics_reachability/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # INVERSE KINEMATICS REACHABILITY
10 |
11 | This example program shows how to use the Inverse Kinematics Service API to make reachability
12 | queries for random arm poses.
13 |
14 | The example:
15 |
16 | - Defines desired tool poses randomly distributed across a rectangle in front of the robot, and a small distance above the ground.
17 | - Defines a tool frame at the tip of the lower jaw, oriented such that the opening of the
18 | gripper will point down when the tool is at one of the desired tool poses.
19 | - Formulates an InverseKinematicsRequest for each desired tool pose, such that a solution
20 | will provide a configuration that places the tool frame at the desired tool pose, while keeping
21 | the feet in their current positions.
22 | - Checks the results returned by the IK service:
23 | - For desired tool poses that the IK service deemed reachable, it issues an arm Cartesian move
24 | command with the desired body pose set to the one provided by IK.
25 | - For desired tool poses that the IK service deemed un-reachable, it issues an arm Cartesian
26 | move with `enable_hip_height_assist` and `enable_body_yaw_assist` both set to `true`.
27 | - Prints the true and false positive/negative results.
28 |
29 | ## Run the Example
30 |
31 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
32 |
33 | ```
34 | ./inverse_kinematics_reachability {ROBOT_IP} --num_poses {NUM_DESIRED_POSES}
35 | ```
36 |
--------------------------------------------------------------------------------
/cpp/examples/joint_control/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.10.2)
2 | project (joint_control)
3 |
4 | # no arm squat example
5 | add_executable(noarm_squat
6 | ${CMAKE_CURRENT_SOURCE_DIR}/noarm_squat.cpp
7 | ${CMAKE_CURRENT_SOURCE_DIR}/joint_api_helper.cpp
8 | )
9 | # wiggle arm example
10 | add_executable(wiggle_arm
11 | ${CMAKE_CURRENT_SOURCE_DIR}/wiggle_arm_example.cpp
12 | ${CMAKE_CURRENT_SOURCE_DIR}/joint_api_helper.cpp
13 | )
14 |
15 | target_compile_features(noarm_squat PUBLIC cxx_std_17)
16 | target_compile_features(wiggle_arm PUBLIC cxx_std_17)
17 |
18 | target_include_directories(noarm_squat PUBLIC
19 | ${CMAKE_CURRENT_SOURCE_DIR}
20 | ${PROTOBUF_INCLUDE_DIR}
21 | )
22 |
23 | target_include_directories(wiggle_arm PUBLIC
24 | ${CMAKE_CURRENT_SOURCE_DIR}
25 | ${PROTOBUF_INCLUDE_DIR}
26 | )
27 |
28 | target_link_libraries(noarm_squat PUBLIC bosdyn_client_static)
29 | target_link_libraries(wiggle_arm PUBLIC bosdyn_client_static)
30 |
31 | install(TARGETS noarm_squat DESTINATION ${CMAKE_INSTALL_BINDIR})
32 | install(TARGETS wiggle_arm DESTINATION ${CMAKE_INSTALL_BINDIR})
--------------------------------------------------------------------------------
/cpp/examples/joint_control/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Joint Control
10 |
11 | These examples utilize the Joint Control API that is available starting in v4.0.2 in order to move the robot. More generally, the Joint Control API allows for low-level control of the robot's joints.
12 |
13 | ### Licensing
14 |
15 | Your robot needs to have a Joint Control license in order to run this example.
16 |
17 | ### Examples
18 |
19 | - [Robot Squat](#armless-robot-squat)
20 | - [Arm Wiggle](#arm-wiggle)
21 |
22 | ### Armless Robot Squat
23 |
24 | #### Hardware
25 |
26 | Your Spot should be a base robot with out an arm attached.
27 |
28 | #### Run the Example
29 |
30 | You will need to launch a software e-stop separately.
31 |
32 | **Safety**: this example will result in Spot moving, so please ensure the area around Spot is kept clear. The robot should not be run from a dock and should start without motors on and in a nominal sitting position on the floor.
33 |
34 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
35 |
36 | ```
37 | ./noarm_squat {ROBOT_IP}
38 | ```
39 |
40 | ### Arm Wiggle
41 |
42 | #### Hardware
43 |
44 | Your Spot needs to have an arm.
45 |
46 | #### Run the Example
47 |
48 | You will need to launch a software e-stop separately.
49 |
50 | **Safety**: this example will result in Spot moving, so please ensure the area around Spot is kept clear.
51 |
52 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
53 |
54 | ```
55 | ./wiggle_arm_example {ROBOT_IP}
56 | ```
57 |
--------------------------------------------------------------------------------
/cpp/examples/query_autowalk_status/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Query Autowalk Status
10 |
11 | This example program loads an autowalk and graph nav map to the robot from a file. It then queries the status of elements and actions in the walk as the autowalk mission plays.
12 |
13 | ## Run the Example
14 |
15 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
16 |
17 | ```
18 | ./query_autowalk_status {ROBOT_IP} --autowalk_mission={Path to Autowalk Mission Folder}
19 | ```
20 |
21 | To see a list a full command line arguments run:
22 |
23 | ```
24 | ./query_autowalk_status --help
25 | ```
26 |
--------------------------------------------------------------------------------
/cpp/examples/spot_cam/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Simple Example for SpotCAM PTZ Control
10 |
11 | This example program points the SpotCAM PTZ to a specific pan/tilt/zoom that the user specifies as command-line arguments.
12 |
13 | ## Run the Example
14 |
15 | To run the example, set BOSDYN_CLIENT_USERNAME and BOSDYN_CLIENT_PASSWORD environment variables with the robot credentials and then run:
16 |
17 | ```
18 | ./ptz_example {ROBOT_IP} --ptz-choice digi --pan 100 --tilt 0 --zoom 5
19 | ```
20 |
21 | The command-line arguments accepted are:
22 |
23 | - `--ptz-choice`: PTZ to set position of.
24 | - `--pan`: Pan position of the PTZ.
25 | - `--tilt`: Tilt position of the PTZ.
26 | - `--zoom`: Zoom position of the PTZ.
27 |
--------------------------------------------------------------------------------
/protos/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # bosdyn-api
10 |
11 |
12 |
13 |
14 |
15 | The bosdyn-api wheel contains the Python implementation for the Protobuf definitions in the Boston
16 | Dynamics Spot API. The message and service types defined in this wheel are used by the clients in
17 | [bosdyn-client](https://pypi.org/project/bosdyn-client/),
18 | [bosdyn-mission](https://pypi.org/project/bosdyn-mission/) and [bosdyn-choreography-client](https://pypi.org/project/bosdyn-choreography-client/) wheels to communicate with the services
19 | running on the Spot robots.
20 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # Basic Proto Definitions
10 |
11 | These protos are the Boston Dynamics Public API.
12 |
13 | ## Contents
14 |
15 | - [Protos](proto_reference)
16 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/alerts.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/alerts";
11 |
12 | option java_outer_classname = "AlertsProto";
13 |
14 | import "google/protobuf/struct.proto";
15 |
16 | // Structured data indicating an alert detected off the robot that can be stored in the DataBuffer
17 | // and associated with with previously stored data.
18 | message AlertData {
19 | enum SeverityLevel {
20 | // Do not use. If severity is unknown, must assume issue is
21 | // highest severity.
22 | SEVERITY_LEVEL_UNKNOWN = 0;
23 | // Informational message that requires no action.
24 | SEVERITY_LEVEL_INFO = 1;
25 | // An error may occur in the future if no action is taken, but no action
26 | // presently required.
27 | SEVERITY_LEVEL_WARN = 2;
28 | // Action required. Error fatal to operation.
29 | SEVERITY_LEVEL_ERROR = 3;
30 | // Action required. Severe error that requires immediate
31 | // attention.
32 | SEVERITY_LEVEL_CRITICAL = 4;
33 | }
34 |
35 | // Severity of this alert.
36 | SeverityLevel severity = 1;
37 |
38 | // Human readable alert title/summary.
39 | string title = 2;
40 |
41 | // The source that triggered the alert.
42 | string source = 3;
43 |
44 | // JSON data for any additional info attached to this alert.
45 | google.protobuf.Struct additional_data = 4;
46 | }
47 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/arm_surface_contact_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/arm_surface_contact_service";
11 |
12 | option java_outer_classname = "ArmSurfaceContactServiceProto";
13 |
14 | import "bosdyn/api/header.proto";
15 | import "bosdyn/api/lease.proto";
16 | import "bosdyn/api/arm_surface_contact.proto";
17 |
18 | service ArmSurfaceContactService {
19 | rpc ArmSurfaceContact(ArmSurfaceContactCommand) returns (ArmSurfaceContactResponse) {}
20 | }
21 |
22 | message ArmSurfaceContactCommand {
23 | RequestHeader header = 1; // Common request header.
24 |
25 | // The Lease to show ownership of the robot.
26 | Lease lease = 2;
27 |
28 | ArmSurfaceContact.Request request = 4;
29 | }
30 |
31 | message ArmSurfaceContactResponse {
32 | // Common response header.
33 | ResponseHeader header = 1;
34 | }
35 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/auth_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/auth_service";
11 |
12 | option java_outer_classname = "AuthServiceProto";
13 |
14 | import "bosdyn/api/auth.proto";
15 |
16 | // The AuthService provides clients the ability to convert a user/password pair into a token. The
17 | // token can then be added to the http2 headers for future requests in order to establish the
18 | // identity of the requester.
19 | service AuthService {
20 | // Request to get the auth token for the robot.
21 | rpc GetAuthToken(GetAuthTokenRequest) returns (GetAuthTokenResponse) {}
22 | }
23 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/auto_return/auto_return_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.auto_return;
10 | option go_package = "bosdyn/api/auto_return/auto_return_service";
11 |
12 | option java_outer_classname = "AutoReturnServiceProto";
13 |
14 | import "bosdyn/api/auto_return/auto_return.proto";
15 |
16 | service AutoReturnService {
17 | // Configure the service.
18 | rpc Configure(ConfigureRequest) returns (ConfigureResponse);
19 |
20 | // Get the current configuration.
21 | rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse);
22 |
23 | // Start AutoReturn now.
24 | rpc Start(StartRequest) returns (StartResponse);
25 | }
26 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/autowalk/autowalk_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.autowalk;
10 | option go_package = "bosdyn/api/autowalk/autowalk_service";
11 |
12 | option java_outer_classname = "AutowalkServiceProto";
13 |
14 | import "bosdyn/api/data_chunk.proto";
15 |
16 | service AutowalkService {
17 | // Compile a walk into a mission.
18 | // Input DataChunks should deserialize into a CompileAutowalkRequest.
19 | // Output DataChunks should deserialize into a CompileAutowalkResponse.
20 | // This rpc is stateless.
21 | rpc CompileAutowalk(stream DataChunk) returns (stream DataChunk) {}
22 |
23 | // Compile a walk into a mission then load to mission service.
24 | // Input DataChunks should deserialize into a LoadAutowalkRequest.
25 | // Output DataChunks should deserialize into a LoadAutowalkResponse.
26 | rpc LoadAutowalk(stream DataChunk) returns (stream DataChunk) {}
27 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/data_acquisition_plugin_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/data_acquisition_plugin_service";
11 |
12 | option java_outer_classname = "DataAcquisitionPluginServiceProto";
13 |
14 | import "bosdyn/api/data_acquisition.proto";
15 |
16 | // The DataAcquisitionPluginService is a gRPC service that a payload developer implements to
17 | // retrieve data from a sensor (or more generally perform some payload action) and optionally store
18 | // that data on the robot via the DataAcquisitionStore service.
19 | service DataAcquisitionPluginService {
20 | // Trigger a data acquisition to save metadata and non-image data to the data buffer.
21 | // Sent by the main Data Acquisition service as a result of a data acquisition request from the
22 | // tablet or a client.
23 | rpc AcquirePluginData(AcquirePluginDataRequest) returns (AcquirePluginDataResponse);
24 |
25 | // Query the status of a data acquisition.
26 | rpc GetStatus(GetStatusRequest) returns (GetStatusResponse);
27 |
28 | // Get information from a Data Acquisition service; lists acquisition capabilities.
29 | rpc GetServiceInfo(GetServiceInfoRequest) returns (GetServiceInfoResponse);
30 |
31 | // Cancel an in-progress data acquisition.
32 | rpc CancelAcquisition(CancelAcquisitionRequest) returns (CancelAcquisitionResponse);
33 |
34 | // Request live data available from this plugin during teleoperation.
35 | // Please use the other RPCs for typical data acquisition.
36 | rpc GetLiveData(LiveDataRequest) returns (LiveDataResponse);
37 | }
38 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/data_acquisition_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/data_acquisition_service";
11 |
12 | option java_outer_classname = "DataAcquisitionServiceProto";
13 |
14 | import "bosdyn/api/data_acquisition.proto";
15 |
16 | // The DataAcquisitionService is the main data acquisition service run on robot, which receives
17 | // incoming requests and sends queries to all directory-registered DataAcquisitionPluginServices.
18 | service DataAcquisitionService {
19 | // Trigger a data acquisition to save data and metadata to the data buffer.
20 | // Sent by the tablet or a client to initiate a data acquisition and buffering process.
21 | rpc AcquireData(AcquireDataRequest) returns (AcquireDataResponse);
22 |
23 | // Query the status of a data acquisition.
24 | rpc GetStatus(GetStatusRequest) returns (GetStatusResponse);
25 |
26 | // Get information from a Data Acquisition service; lists acquisition capabilities.
27 | rpc GetServiceInfo(GetServiceInfoRequest) returns (GetServiceInfoResponse);
28 |
29 | // Cancel an in-progress data acquisition.
30 | rpc CancelAcquisition(CancelAcquisitionRequest) returns (CancelAcquisitionResponse);
31 |
32 | // Request live data available from DAQ plugins during teleoperation.
33 | // Please use the other RPCs for typical data acquisition.
34 | rpc GetLiveData(LiveDataRequest) returns (LiveDataResponse);
35 | }
36 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/data_buffer_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | // DataBufferService allows adding information to the robot's log files.
8 | syntax = "proto3";
9 |
10 | package bosdyn.api;
11 | option go_package = "bosdyn/api/data_buffer_service";
12 |
13 | option java_outer_classname = "DataBufferServiceProto";
14 |
15 | import "bosdyn/api/data_buffer.proto";
16 |
17 | // This service is a mechanism for adding information to the robot's log files.
18 | service DataBufferService {
19 | // Add text messages to the log.
20 | rpc RecordTextMessages(RecordTextMessagesRequest) returns (RecordTextMessagesResponse) {}
21 |
22 | // Add a set of operator messages to the log.
23 | rpc RecordOperatorComments(RecordOperatorCommentsRequest)
24 | returns (RecordOperatorCommentsResponse) {}
25 |
26 | // Add message-style data to the log.
27 | rpc RecordDataBlobs(RecordDataBlobsRequest) returns (RecordDataBlobsResponse) {}
28 |
29 | // Add event data to the log.
30 | rpc RecordEvents(RecordEventsRequest) returns (RecordEventsResponse) {}
31 |
32 | // Register a log tick schema, allowing client to later log tick data.
33 | rpc RegisterSignalSchema(RegisterSignalSchemaRequest) returns (RegisterSignalSchemaResponse) {}
34 |
35 | // Add signal data for registered signal schema to the log.
36 | rpc RecordSignalTicks(RecordSignalTicksRequest) returns (RecordSignalTicksResponse) {}
37 | }
38 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/data_chunk.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/data_chunk";
11 |
12 | option java_outer_classname = "DataChunkProto";
13 |
14 | // Represents a chunk of (possibly serialized) data.
15 | // Chunks will be concatenated together to produce a datagram.
16 | // This is to avoid size limit restrictions in grpc implementations.
17 | message DataChunk {
18 | // The total size in bytes of the datagram that this chunk is a part of.
19 | uint64 total_size = 1;
20 | // Bytes in this data chunk. Bytes are sent sequentially.
21 | bytes data = 2;
22 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/data_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | // DataBufferService allows adding information to the robot's log files.
8 | syntax = "proto3";
9 |
10 | package bosdyn.api;
11 | option go_package = "bosdyn/api/data_service";
12 |
13 | option java_outer_classname = "DataServiceProto";
14 |
15 | import "bosdyn/api/data_index.proto";
16 |
17 | // The DataService is a mechanism for querying and managing data stored on robot.
18 | service DataService {
19 | // Get index of current data matching a given DataQuery.
20 | rpc GetDataIndex(GetDataIndexRequest) returns (GetDataIndexResponse) {}
21 |
22 | // Get events and comments.
23 | rpc GetEventsComments(GetEventsCommentsRequest) returns (GetEventsCommentsResponse) {}
24 |
25 |
26 | // Get basic stats on data buffer storage.
27 | rpc GetDataBufferStatus(GetDataBufferStatusRequest) returns (GetDataBufferStatusResponse) {}
28 |
29 | // Get a list pf pages matching a given time range
30 | rpc GetDataPages(GetDataPagesRequest) returns (GetDataPagesResponse) {}
31 |
32 | // Delete a list of pages matching a given time range or page ids
33 | rpc DeleteDataPages(DeleteDataPagesRequest) returns (DeleteDataPagesResponse) {}
34 | }
35 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/directory_registration_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/directory_registration_service";
11 |
12 | option java_outer_classname = "DirectoryRegistrationServiceProto";
13 |
14 | import "bosdyn/api/directory_registration.proto";
15 |
16 | // DirectoryRegistrationService is a private class that lets services be
17 | // discovered by clients by adding them to a discovery database. Services
18 | // can live on robot, payload, or other accessible cloud-based locations.
19 | // Each service is responsible for registering itself with this service.
20 | service DirectoryRegistrationService {
21 | // Called by a producer to register as a provider with the application. Returns the
22 | // record for that provider. Requires unique name and correctly filled out service
23 | // record in request.
24 | rpc RegisterService(RegisterServiceRequest) returns (RegisterServiceResponse) {}
25 |
26 | // Called by a producer to remove its registration from the DirectoryManager.
27 | rpc UnregisterService(UnregisterServiceRequest) returns (UnregisterServiceResponse) {}
28 |
29 | // Update the ServiceEntry for a producer on the server.
30 | rpc UpdateService(UpdateServiceRequest) returns (UpdateServiceResponse) {}
31 | }
32 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/directory_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/directory_service";
11 |
12 | option java_outer_classname = "DirectoryServiceProto";
13 |
14 | import "bosdyn/api/directory.proto";
15 |
16 | // DirectoryService lets clients discover which API services are available on a robot.
17 | service DirectoryService {
18 | // Get information about a specific service.
19 | rpc GetServiceEntry(GetServiceEntryRequest) returns (GetServiceEntryResponse);
20 |
21 | // List all known services at time of call.
22 | rpc ListServiceEntries(ListServiceEntriesRequest) returns (ListServiceEntriesResponse);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/docking/docking_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.docking;
10 | option go_package = "bosdyn/api/docking/docking_service";
11 |
12 | option java_outer_classname = "DockingServiceProto";
13 |
14 | import "bosdyn/api/docking/docking.proto";
15 |
16 | // The DockingService provides an interface to dock and undock the robot from Spot Docks,
17 | // as well as get feedback on command status, and get the current docked status of the robot.
18 | service DockingService {
19 | // Starts a docking command on the robot.
20 | rpc DockingCommand(DockingCommandRequest) returns (DockingCommandResponse) {}
21 |
22 | // Check the status of a docking command.
23 | rpc DockingCommandFeedback(DockingCommandFeedbackRequest)
24 | returns (DockingCommandFeedbackResponse) {}
25 |
26 | // Get the configured dock ID ranges.
27 | rpc GetDockingConfig(GetDockingConfigRequest) returns (GetDockingConfigResponse) {}
28 |
29 | // Get the robot's docking state
30 | rpc GetDockingState(GetDockingStateRequest) returns (GetDockingStateResponse) {}
31 | }
32 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/fault_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/fault_service";
11 |
12 | option java_outer_classname = "FaultServiceProto";
13 |
14 | import "bosdyn/api/service_fault.proto";
15 |
16 | // The service fault service enables modification of the robot state ServiceFaultState.
17 | service FaultService {
18 | // Sends a ServiceFault to be reporting in robot state.
19 | rpc TriggerServiceFault(TriggerServiceFaultRequest) returns (TriggerServiceFaultResponse) {}
20 |
21 | // Clears an active ServiceFault from robot state.
22 | rpc ClearServiceFault(ClearServiceFaultRequest) returns (ClearServiceFaultResponse) {}
23 | }
24 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/gps/aggregator.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.gps;
10 | option go_package = "bosdyn/api/gps/aggregator";
11 |
12 | option java_outer_classname = "AggregatorProto";
13 |
14 | import "bosdyn/api/header.proto";
15 | import "bosdyn/api/gps/gps.proto";
16 |
17 | message NewGpsDataRequest {
18 | // Common request header.
19 | bosdyn.api.RequestHeader header = 1;
20 |
21 | // GPS Measurements. GPS units that generate data at a high rate
22 | // can bundle multiple measurements together in a single message.
23 | repeated bosdyn.api.gps.GpsDataPoint data_points = 2;
24 |
25 | // Describer for what device is generating GPS data.
26 | GpsDevice gps_device = 3;
27 | }
28 |
29 | message NewGpsDataResponse {
30 | // Common response header.
31 | bosdyn.api.ResponseHeader header = 1;
32 | }
33 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/gps/aggregator_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.gps;
10 | option go_package = "bosdyn/api/gps/aggregator_service";
11 |
12 | option java_outer_classname = "AggregatorServiceProto";
13 |
14 | import "bosdyn/api/gps/aggregator.proto";
15 |
16 | /*
17 | * The AggregatorService is an endpoint that clients should send GPS data too.
18 | * Data dumped into the AggregatorService is used by the RegistrationService.
19 | * In practice:
20 | * - A GPS will be connected to a peripheral computer
21 | * - The peripheral computer should establish timesync with the robot
22 | * - The peripheral computer should read data from the GPS hardware
23 | * - The peripheral computer should send timestamped data to the AggregatorService
24 | */
25 | service AggregatorService {
26 | rpc NewGpsData(NewGpsDataRequest) returns (NewGpsDataResponse) {}
27 | }
28 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/gps/registration_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.gps;
10 | option go_package = "bosdyn/api/gps/registration_service";
11 |
12 | option java_outer_classname = "RegistrationServiceProto";
13 |
14 | import "bosdyn/api/gps/registration.proto";
15 |
16 | /*
17 | * The RegistrationService consumes data sent to the Gps/AggregatorService.
18 | * It calculates where the robot is in the world, and the transforms from
19 | * the robots internal frames to the world frame.
20 | */
21 | service RegistrationService {
22 | rpc GetLocation(GetLocationRequest) returns (GetLocationResponse) {}
23 | rpc ResetRegistration(ResetRegistrationRequest) returns (ResetRegistrationResponse) {}
24 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/graph_nav/area_callback_data.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.graph_nav;
10 | option go_package = "bosdyn/api/graph_nav/area_callback_data";
11 | option java_outer_classname = "AreaCallbackDataProto";
12 |
13 | import "google/protobuf/any.proto";
14 | import "bosdyn/api/service_customization.proto";
15 |
16 | // Configuration data for how an area callback should be treated in a map.
17 | message AreaCallbackMapConfig {
18 | }
19 |
20 | // Data for a AreaCallback to be stored in the map
21 | message AreaCallbackData {
22 | // Custom config data used by the service to do its job.
23 | google.protobuf.Any config_data = 1;
24 |
25 | // Deprecated in 4.1, use param_collection instead so that the
26 | // parameter specs are available for building editors.
27 | // Any other custom parameters to the callback. This will be copied into
28 | // custom_params inside the BeginCallback RPC if it exists.
29 | DictParam custom_params = 2 [deprecated = true];
30 |
31 | // Any other custom parameters to the callback. This will be copied into
32 | // custom_params inside the BeginCallback RPC if it exists.
33 | CustomParamCollection parameters = 4;
34 |
35 | // Configuration data for how this area callback should be treated in the map.
36 | AreaCallbackMapConfig map_config = 3;
37 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/graph_nav/lost_detection.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 | package bosdyn.api.graph_nav;
9 | option go_package = "bosdyn/api/graph_nav/lost_detection";
10 | option java_outer_classname = "LostDetectionProto";
11 |
12 | // Determines how "strict" the lost detector is about declaring lost.
13 | enum LostDetectorStrictness {
14 | LOST_DETECTOR_STRICTNESS_UNKNOWN = 0; // Unset (defaults to STRICTNESS_DEFAULT).
15 | LOST_DETECTOR_STRICTNESS_DISABLED = 1; // Never declares lost.
16 | LOST_DETECTOR_STRICTNESS_PERMISSIVE = 2; // Declares lost less readily than default.
17 | LOST_DETECTOR_STRICTNESS_DEFAULT = 3; // Default lost detector strictness.
18 | LOST_DETECTOR_STRICTNESS_STRICT = 4; // Declares lost more readily than default.
19 | };
--------------------------------------------------------------------------------
/protos/bosdyn/api/graph_nav/map_processing_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.graph_nav;
10 | option go_package = "bosdyn/api/graph_nav/map_processing_service";
11 |
12 | option java_outer_classname = "MapProcessingServiceProto";
13 |
14 | import "bosdyn/api/graph_nav/map_processing.proto";
15 |
16 | // Defines services for processing an existing GraphNav map.
17 | service MapProcessingService {
18 | // Processes a GraphNav map by creating additional edges or waypoints. After processing,
19 | // a new subgraph is created containing additional waypoints or edges to add to the map.
20 | rpc ProcessTopology(ProcessTopologyRequest) returns (stream ProcessTopologyResponse) {}
21 |
22 | // Processes a GraphNav map by modifying the anchoring of waypoints and world objects in the map
23 | // with respect to a seed frame. After processing, a new anchoring is streamed back.
24 | rpc ProcessAnchoring(ProcessAnchoringRequest) returns (stream ProcessAnchoringResponse) {}
25 | }
26 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/gripper_camera_param_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/gripper_camera_param_service";
11 |
12 | option java_outer_classname = "GripperCameraParamServiceProto";
13 |
14 | import "bosdyn/api/gripper_camera_param.proto";
15 |
16 | service GripperCameraParamService {
17 | rpc SetParams(GripperCameraParamRequest) returns (GripperCameraParamResponse) {}
18 | rpc GetParams(GripperCameraGetParamRequest) returns (GripperCameraGetParamResponse) {}
19 | rpc SetCamCalib(SetGripperCameraCalibrationRequest)
20 | returns (SetGripperCameraCalibrationResponse) {}
21 | rpc GetCamCalib(GetGripperCameraCalibrationRequest)
22 | returns (GetGripperCameraCalibrationResponse) {}
23 | }
24 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/image_geometry.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/image_geometry";
11 |
12 | option java_outer_classname = "ImageGeometryProto";
13 |
14 | // geometry.proto is standardized to use double fields. There are some primitives already specified
15 | // in geometry.proto that want int fields, for example a rectangle that represents the area on an
16 | // image. This file is for primitives that have int fields.
17 |
18 | // Represents a rectangle, with integer indices.
19 | message RectangleI {
20 | // Distance from the left
21 | int32 x = 5;
22 | // Distance from the top
23 | int32 y = 6;
24 | // Width of the rectangle in pixels
25 | int32 cols = 7;
26 | // Height of the rectangle in pixels
27 | int32 rows = 8;
28 |
29 | reserved 1, 2, 3, 4;
30 | }
31 |
32 | // Represents a point in the XY plane, with integer indices.
33 | message Vec2I {
34 | int32 x = 1;
35 | int32 y = 2;
36 | }
37 |
38 | // Represents a polygon in the XY plane, with integer indices.
39 | // This can be convex or concave, and clockwise or counter-clockwise, but
40 | // must not self-intersect.
41 | message PolygonI {
42 | repeated Vec2I vertices = 1;
43 | }
44 |
45 | // Represents an area in the XY plane, with integer indices.
46 | message AreaI {
47 | oneof geometry {
48 | RectangleI rectangle = 1;
49 | PolygonI polygon = 2;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/image_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/image_service";
11 |
12 | option java_outer_classname = "ImageServiceProto";
13 |
14 | import "bosdyn/api/image.proto";
15 |
16 | // An Image service provides access to one or more images, for example from cameras. It
17 | // supports querying for the list of available images provided by the service and then
18 | // supports requesting a latest given image by source name.
19 | service ImageService {
20 | // Obtain the list of ImageSources for this given service.
21 | // Note that there may be multiple ImageServices running, each with their own set of sources
22 | // The name field keys access to individual images when calling GetImage.
23 | rpc ListImageSources(ListImageSourcesRequest) returns (ListImageSourcesResponse) {}
24 |
25 | // Request an image by name, with optional parameters for requesting image quality level.
26 | rpc GetImage(GetImageRequest) returns (GetImageResponse) {}
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/ir_enable_disable.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/ir_enable_disable";
11 | option java_outer_classname = "IREnableDisableProto";
12 |
13 | import "bosdyn/api/header.proto";
14 |
15 | message IREnableDisableRequest {
16 | RequestHeader header = 1; ///< Common request header.
17 |
18 | enum Request {
19 | // Unspecified value -- should not be used.
20 | REQUEST_UNKNOWN = 0;
21 |
22 | // Disable emissions.
23 | REQUEST_OFF = 1;
24 |
25 | // Enable emissions.
26 | REQUEST_ON = 2;
27 | }
28 | Request request = 2;
29 | }
30 |
31 | message IREnableDisableResponse {
32 | ResponseHeader header = 1; ///< Common response header.
33 | }
34 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/ir_enable_disable_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/ir_enable_disable_service";
11 |
12 | option java_outer_classname = "IREnableDisableServiceProto";
13 |
14 | import "bosdyn/api/ir_enable_disable.proto";
15 |
16 | service IREnableDisableService {
17 | rpc IREnableDisable(IREnableDisableRequest) returns (IREnableDisableResponse) {}
18 | }
19 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/keepalive/keepalive_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.keepalive;
10 | option go_package = "bosdyn/api/keepalive/keepalive_service";
11 |
12 | option java_outer_classname = "KeepaliveServiceProto";
13 |
14 | import "bosdyn/api/keepalive/keepalive.proto";
15 |
16 | // The Keepalive service allows users to specify what the system should do when one or more clients
17 | // stop communicating with the robot. The actions, and when those actions happen, are specified in a
18 | // Policy. Clients will periodically check in with the Keepalive service to prevent the actions from
19 | // happening.
20 | //
21 | // This service is in BETA and may undergo changes in future releases.
22 | service KeepaliveService {
23 | // Add and/or remove policies of the session.
24 | // Adding or removing only happens if all parts of the request are valid. For example, if the
25 | // policy to be added is valid, but policies to be removed are not valid, no policy is added.
26 | rpc ModifyPolicy(ModifyPolicyRequest) returns (ModifyPolicyResponse) {}
27 | // Refresh the timer on a specific policy.
28 | rpc CheckIn(CheckInRequest) returns (CheckInResponse) {}
29 | // Get the status of the current session.
30 | rpc GetStatus(GetStatusRequest) returns (GetStatusResponse) {}
31 | }
32 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/lease_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/lease_service";
11 |
12 | option java_outer_classname = "LeaseServiceProto";
13 |
14 | import "bosdyn/api/lease.proto";
15 |
16 | // LeaseService provides Leases of shared resources to clients.
17 | // An example of a shared resource is the set of leg motors on Spot, which
18 | // has the resource name of "body".
19 | // Clients can delegate out the Leases they receive from the LeaseService
20 | // to additional clients or services by generating sub-leases.
21 | // Leases obtained from the LeaseService may be revoked if the Lease holder
22 | // does not check in frequently to the LeaseService, or if another client
23 | // force-acquires a Lease.
24 | service LeaseService {
25 | // Acquire a lease to a specific resource if the resource is available.
26 | rpc AcquireLease(AcquireLeaseRequest) returns (AcquireLeaseResponse);
27 |
28 | // Take a lease for a specific resource even if another client has a lease.
29 | rpc TakeLease(TakeLeaseRequest) returns (TakeLeaseResponse);
30 |
31 | // Return a lease to the LeaseService.
32 | rpc ReturnLease(ReturnLeaseRequest) returns (ReturnLeaseResponse);
33 |
34 | // List state of all leases managed by the LeaseService.
35 | rpc ListLeases(ListLeasesRequest) returns (ListLeasesResponse);
36 |
37 | // Retain possession of a lease.
38 | rpc RetainLease(RetainLeaseRequest) returns (RetainLeaseResponse);
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/license_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/license_service";
11 |
12 | option java_outer_classname = "LicenseServiceProto";
13 |
14 | import "bosdyn/api/license.proto";
15 |
16 | // The LicenseService allows clients to query the currently installed license on robot.
17 | service LicenseService {
18 | // Get information, such as the license number, dates of validity, and features for the license
19 | // currently uploaded on the robot.
20 | rpc GetLicenseInfo(GetLicenseInfoRequest) returns (GetLicenseInfoResponse) {}
21 |
22 | // Check if specific features (identified by string names) are enabled under the currently
23 | // loaded license for this robot.
24 | rpc GetFeatureEnabled(GetFeatureEnabledRequest) returns (GetFeatureEnabledResponse) {}
25 | }
26 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/local_grid_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/local_grid_service";
11 |
12 | option java_outer_classname = "LocalGridServiceProto";
13 |
14 | import "bosdyn/api/local_grid.proto";
15 |
16 | // The map service provides access multiple kinds of cell-based map data.
17 | // It supports querying for the list of available types of local grids provided by the service,
18 | // and supports requesting a set of the latest local grids by map type name.
19 | service LocalGridService {
20 | // Obtain the list of available map types.
21 | // The name field keys access to individual local grids when calling GetLocalGrids.
22 | rpc GetLocalGridTypes(GetLocalGridTypesRequest) returns (GetLocalGridTypesResponse) {}
23 |
24 | // Request a set of local grids by type name.
25 | rpc GetLocalGrids(GetLocalGridsRequest) returns (GetLocalGridsResponse) {}
26 | }
27 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/manipulation_api_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/manipulation_api_service";
11 |
12 | import "bosdyn/api/manipulation_api.proto";
13 |
14 | service ManipulationApiService {
15 | rpc ManipulationApi(ManipulationApiRequest) returns (ManipulationApiResponse) {}
16 |
17 | rpc ManipulationApiFeedback(ManipulationApiFeedbackRequest)
18 | returns (ManipulationApiFeedbackResponse) {}
19 |
20 | rpc OverrideGrasp(ApiGraspOverrideRequest) returns (ApiGraspOverrideResponse) {}
21 | }
22 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/metrics_logging/metrics_logging_robot_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.metrics_logging;
10 | option go_package = "bosdyn/api/metrics_logging/metrics_logging_robot_service";
11 |
12 | import "bosdyn/api/metrics_logging/metrics_logging_robot.proto";
13 |
14 | option java_outer_classname = "MetricsLoggingRobotServiceProto";
15 |
16 | service MetricsLoggingRobotService {
17 | rpc GetStoreSequenceRange(GetStoreSequenceRangeRequest)
18 | returns (GetStoreSequenceRangeResponse) {}
19 | rpc GetAbsoluteMetricSnapshot(GetAbsoluteMetricSnapshotRequest)
20 | returns (GetAbsoluteMetricSnapshotResponse) {}
21 | rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {}
22 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/metrics_logging/signed_proto.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.metrics_logging;
10 | option go_package = "bosdyn/api/metrics_logging/signed_proto";
11 |
12 | option java_outer_classname = "SignedProtoProto";
13 |
14 | /**
15 | * A custom signed format. Sequentially laid out:
16 | *
17 | * 4 bytes header
18 | * 20 bytes fingerprint
19 | * 512 bytes signature
20 | * X bytes data.
21 | *
22 | * header -> When this format changes, we'll use the header to deliminate which
23 | * format was used to generate this data.
24 | *
25 | * fingerprint -> The fingerprint of public key corresponding to the private key
26 | * that was used to generate the signature. As keys rotate, this will allow
27 | * the signature verifier to know what key to use to verify the signature.
28 | *
29 | * signature -> signature of the data field.
30 | *
31 | * data -> Contents specified by parent container. Usually contains a serialized
32 | * protobuf.
33 | */
34 | message SignedProto {
35 | bytes data = 1;
36 | }
--------------------------------------------------------------------------------
/protos/bosdyn/api/mission/remote_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.mission;
10 | option go_package = "bosdyn/api/mission/remote_service";
11 |
12 | option java_outer_classname = "RemoteServiceProto";
13 |
14 | import "bosdyn/api/mission/remote.proto";
15 |
16 | // Interface for mission callbacks. Mission RemoteGrpc nodes will act as clients
17 | // to this service type, calling out to this service when loaded, ticked, or unloaded.
18 | service RemoteMissionService {
19 | // Call this once at mission load time, once for each node that references this remote service.
20 | rpc EstablishSession(EstablishSessionRequest) returns (EstablishSessionResponse) {}
21 | // Call this every time the RemoteGrpc node is ticked.
22 | rpc Tick(TickRequest) returns (TickResponse) {}
23 | // Call this every time the RemoteGrpc node WAS ticked in the previous cycle, but was NOT ticked
24 | // in this cycle. Signals that the next tick will be a restart, rather than a continuation.
25 | rpc Stop(StopRequest) returns (StopResponse) {}
26 | // Tells the service it can forget any data associated with the given session ID.
27 | // Should be called once for every EstablishSession call.
28 | rpc TeardownSession(TeardownSessionRequest) returns (TeardownSessionResponse) {}
29 | // Asks the service what to describe itself Can be called by clients at mission
30 | // record time to parameterize a RemoteGrpc node.
31 | rpc GetRemoteMissionServiceInfo(GetRemoteMissionServiceInfoRequest)
32 | returns (GetRemoteMissionServiceInfoResponse) {}
33 | }
34 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/network_compute_bridge_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/network_compute_bridge_service";
11 |
12 | import "bosdyn/api/network_compute_bridge.proto";
13 |
14 | // RPCs for sending images or other data to networked server for computation.
15 | service NetworkComputeBridge {
16 | rpc NetworkCompute(NetworkComputeRequest) returns (NetworkComputeResponse) {}
17 | rpc ListAvailableModels(ListAvailableModelsRequest) returns (ListAvailableModelsResponse) {}
18 | }
19 |
20 | // Set of RPCs for workers of the network compute bridge. This is separate from the RPCs for the
21 | // on-robot network compute bridge so that if they need to diverge in the future it is possible
22 | // to do so.
23 | service NetworkComputeBridgeWorker {
24 | rpc NetworkCompute(NetworkComputeRequest) returns (NetworkComputeResponse) {
25 | // DEPRECATED as of 3.3, use WorkerComputeRequest instead.
26 | option deprecated = true;
27 | }
28 |
29 | rpc WorkerCompute(WorkerComputeRequest) returns (WorkerComputeResponse) {}
30 |
31 | rpc ListAvailableModels(ListAvailableModelsRequest) returns (ListAvailableModelsResponse) {}
32 | }
33 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/parameter.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/parameter";
11 |
12 | import "google/protobuf/duration.proto";
13 | import "google/protobuf/timestamp.proto";
14 |
15 | option java_outer_classname = "ParameterProto";
16 |
17 | // A generic parameter message used by the robot state service to describe different,
18 | // parameterized aspects of the robot.
19 | message Parameter {
20 | // Name of parameter.
21 | string label = 1;
22 |
23 | // Units of parameter value.
24 | string units = 2;
25 |
26 | oneof values {
27 | // Value of a countable measure.
28 | int64 int_value = 3;
29 |
30 | // Value of a continuous measure.
31 | double float_value = 4;
32 |
33 | // A point in time.
34 | google.protobuf.Timestamp timestamp = 5;
35 |
36 | // A time duration.
37 | google.protobuf.Duration duration = 6;
38 |
39 | // Value as a string.
40 | string string_value = 7;
41 |
42 | // Value as true/false.
43 | bool bool_value = 8;
44 |
45 | // Unsigned integer
46 | uint64 uint_value = 10;
47 | }
48 |
49 | // Description of the parameter or its value.
50 | string notes = 9;
51 | }
52 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/payload_registration_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/payload_registration_service";
11 |
12 | option java_outer_classname = "PayloadRegistrationServiceProto";
13 |
14 | import "bosdyn/api/payload_registration.proto";
15 |
16 | // This service provides a way to register new payloads.
17 | service PayloadRegistrationService {
18 | // Register a payload with the directory.
19 | rpc RegisterPayload(RegisterPayloadRequest) returns (RegisterPayloadResponse);
20 | // Update the version for the registered payload.
21 | rpc UpdatePayloadVersion(UpdatePayloadVersionRequest) returns (UpdatePayloadVersionResponse);
22 | // Get the authentication token information associated with a given payload.
23 | rpc GetPayloadAuthToken(GetPayloadAuthTokenRequest) returns (GetPayloadAuthTokenResponse);
24 | // Tell the robot whether the specified payload is attached..
25 | rpc UpdatePayloadAttached(UpdatePayloadAttachedRequest) returns (UpdatePayloadAttachedResponse);
26 | }
27 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/payload_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/payload_service";
11 |
12 | option java_outer_classname = "PayloadAccessServiceProto";
13 |
14 | import "bosdyn/api/payload.proto";
15 |
16 | // This service provides a way to query for the currently-registered payloads.
17 | service PayloadService {
18 | // List all payloads the robot knows about.
19 | rpc ListPayloads(ListPayloadsRequest) returns (ListPayloadsResponse);
20 | }
21 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/payload_software_update_initiation.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/payload_software_update_initiation";
11 | option java_outer_classname = "PayloadSoftwareUpdateInitiationProto";
12 |
13 | // Event instructing the payload to send its current software version information
14 | // via a trusted channel.
15 | message TriggerSendPayloadSoftwareInfoRequest {}
16 |
17 | message TriggerSendPayloadSoftwareInfoResponse {}
18 |
19 | // Event instructing the payload to initiate its software update process.
20 | message TriggerInitiateUpdateRequest {}
21 |
22 | message TriggerInitiateUpdateResponse {}
23 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/payload_software_update_initiation_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/payload_software_update_initiation_service";
11 | option java_outer_classname = "PayloadSoftwareUpdateInitiationServiceProto";
12 |
13 | import "bosdyn/api/payload_software_update_initiation.proto";
14 |
15 | // This service is hosted by a payload and is used by Spot to tell it to perform
16 | // certain actions related to payload software update. These RPCs support events only;
17 | // no data exchange takes place.
18 | service PayloadSoftwareUpdateInitiationService {
19 | // Tell the payload to send information about its current software version.
20 | rpc TriggerSendPayloadSoftwareInfo(TriggerSendPayloadSoftwareInfoRequest)
21 | returns (TriggerSendPayloadSoftwareInfoResponse);
22 | // Tell the payload to initiate its software update operation.
23 | rpc TriggerInitiateUpdate(TriggerInitiateUpdateRequest) returns (TriggerInitiateUpdateResponse);
24 | }
25 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/payload_software_update_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/payload_software_update_service";
11 | option java_outer_classname = "PayloadSoftwareUpdateServiceProto";
12 |
13 | import "bosdyn/api/payload_software_update.proto";
14 |
15 | // The PayloadSoftwareUpdateService is hosted by a robot and coordinates software updates of the
16 | // various payloads attached to the robot. Each payload connects to this service to communicate
17 | // its current version, obtain information about available updates, and provide status of the
18 | // update process.
19 | service PayloadSoftwareUpdateService {
20 | // Send the payload's current software version information to the service.
21 | rpc SendCurrentVersionInfo(SendCurrentVersionInfoRequest)
22 | returns (SendCurrentVersionInfoResponse);
23 | // Query the payload software update service for available software updates for the payload
24 | // and any updateable components hosted by the payload.
25 | rpc GetAvailableSoftwareUpdates(GetAvailableSoftwareUpdatesRequest)
26 | returns (GetAvailableSoftwareUpdatesResponse);
27 | // Set the status of the payload software update in process.
28 | rpc SendSoftwareUpdateStatus(SendSoftwareUpdateStatusRequest)
29 | returns (SendSoftwareUpdateStatusResponse);
30 | }
31 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/point_cloud_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/point_cloud_service";
11 |
12 | option java_outer_classname = "PointCloudServiceProto";
13 |
14 | import "bosdyn/api/point_cloud.proto";
15 |
16 | // The point cloud service provides access to one or more point cloud sources, for example
17 | // from a lidar. It supports querying the list of available sources provided by the service
18 | // and it supports requesting the latest point cloud data for each source by name.
19 | service PointCloudService {
20 | // Obtain the list of PointCloudSources for this given service.
21 | // Note that there may be multiple PointCloudServices running, each with their own set of
22 | // sources The name field keys access to individual point clouds when calling GetPointCloud.
23 | rpc ListPointCloudSources(ListPointCloudSourcesRequest)
24 | returns (ListPointCloudSourcesResponse) {}
25 |
26 | // Request point clouds by source name.
27 | rpc GetPointCloud(GetPointCloudRequest) returns (GetPointCloudResponse) {}
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/power_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/power_service";
11 |
12 | option java_outer_classname = "PowerServiceProto";
13 |
14 | import "bosdyn/api/power.proto";
15 |
16 | // The power service for the robot that can power on/off the robot's motors.
17 | service PowerService {
18 | // Starts a power command on the robot. A robot can only accept one power command at once.
19 | // Power commands, are not interruptible. Once a command is issued, it must complete before
20 | // another command can be issued.
21 | rpc PowerCommand(PowerCommandRequest) returns (PowerCommandResponse) {}
22 |
23 | // Check the status of a power command.
24 | rpc PowerCommandFeedback(PowerCommandFeedbackRequest) returns (PowerCommandFeedbackResponse) {}
25 |
26 | // Separate RPC for toggling fan power due to need for time/percent power parameters
27 | rpc FanPowerCommand(FanPowerCommandRequest) returns (FanPowerCommandResponse) {}
28 |
29 | // Check the status of a fan power command.
30 | rpc FanPowerCommandFeedback(FanPowerCommandFeedbackRequest)
31 | returns (FanPowerCommandFeedbackResponse) {}
32 |
33 | // Reset the safety stop bit on SRSF-configured robots.
34 | rpc ResetSafetyStop(ResetSafetyStopRequest) returns (ResetSafetyStopResponse) {}
35 | }
36 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/ray_cast_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/ray_cast_service";
11 |
12 | option java_outer_classname = "RayCastServiceProto";
13 |
14 | import "bosdyn/api/ray_cast.proto";
15 |
16 | service RayCastService {
17 | // Asks robot to cast the desired ray against its map of the
18 | // surrounding environment to find the nearest intersection point.
19 | rpc Raycast(RaycastRequest) returns (RaycastResponse) {}
20 | }
21 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/robot_command_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/robot_command_service";
11 | option java_outer_classname = "RobotCommandServiceProto";
12 |
13 | import "bosdyn/api/robot_command.proto";
14 |
15 | // The robot command service allows a client application to control and move the robot.
16 | service RobotCommandService {
17 | // Starts a behavior command on the robot. Issuing a new command overrides the active command.
18 | // Each command is issued a UID for feedback retrieval.
19 | rpc RobotCommand(RobotCommandRequest) returns (RobotCommandResponse) {}
20 |
21 | // A client queries this RPC to determine a robot's progress towards completion of a command.
22 | // This updates the client with metrics like "distance to goal."
23 | // The client should use this feedback to determine whether the current command has
24 | // succeeded or failed, and thus send the next command.
25 | rpc RobotCommandFeedback(RobotCommandFeedbackRequest) returns (RobotCommandFeedbackResponse) {}
26 |
27 | // Clear robot behavior fault.
28 | rpc ClearBehaviorFault(ClearBehaviorFaultRequest) returns (ClearBehaviorFaultResponse) {}
29 |
30 | }
31 |
32 | // This service is used to stream high rate commands to the robot once they have been activated
33 | // using RobotCommandService.RobotCommand
34 | // This service is in BETA and may undergo changes in future releases.
35 | service RobotCommandStreamingService {
36 | // Command updates for joint control
37 | rpc JointControlStream(stream JointControlStreamRequest) returns (JointControlStreamResponse) {}
38 | }
39 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/robot_id_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/robot_id_service";
11 |
12 | option java_outer_classname = "RobotIdServiceProto";
13 |
14 | import "bosdyn/api/robot_id.proto";
15 |
16 | // RobotIdService provides mostly static identifying information about a robot.
17 | // User authentication is not required to access RobotIdService to assist with
18 | // early robot discovery.
19 | service RobotIdService {
20 | // Get the robot id information. The ID contains basic information about a robot
21 | // which is made available over the network as part of robot discovery without
22 | // requiring user authentication.
23 | rpc GetRobotId(RobotIdRequest) returns (RobotIdResponse) {}
24 | }
25 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/robot_state_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/robot_state_service";
11 |
12 | option java_outer_classname = "RobotStateServiceProto";
13 |
14 | import "bosdyn/api/robot_state.proto";
15 |
16 | // The robot state service tracks all information about the measured and computed states of the
17 | // robot at the current time.
18 | service RobotStateService {
19 | // Get robot state information (such as kinematic state, power state, or faults).
20 | rpc GetRobotState(RobotStateRequest) returns (RobotStateResponse) {}
21 |
22 | // Get different robot metrics and parameters from the robot.
23 | rpc GetRobotMetrics(RobotMetricsRequest) returns (RobotMetricsResponse) {}
24 |
25 | // Get the hardware configuration of the robot, which describes the robot skeleton and urdf.
26 | rpc GetRobotHardwareConfiguration(RobotHardwareConfigurationRequest)
27 | returns (RobotHardwareConfigurationResponse) {}
28 |
29 | // Returns the OBJ file for a specific robot link. Intended to be called after
30 | // GetRobotHardwareConfiguration, using the link names returned by that call.
31 | rpc GetRobotLinkModel(RobotLinkModelRequest) returns (RobotLinkModelResponse) {}
32 |
33 | }
34 |
35 | // This service is in BETA and may undergo changes in future releases.
36 | service RobotStateStreamingService {
37 | // Lightweight Streaming version of RobotState
38 | rpc GetRobotStateStream(RobotStateStreamRequest) returns (stream RobotStateStreamResponse) {}
39 | }
40 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot/door_area_callback.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot;
10 | option go_package = "bosdyn/api/spot/door_area_callback";
11 | option java_outer_classname = "DoorAreaCallbackProto";
12 |
13 | import "bosdyn/api/spot/door.proto";
14 |
15 | // At record time, the robot is only physically required to go through the door in one direction,
16 | // but the command for both directions must be recorded.
17 | message AreaCallbackDoorConfig {
18 | // The door command issued for going through the door in the recorded direction
19 | DoorCommand.Request forward_command = 10;
20 |
21 | // The door command for going through the door in the reverse to recorded direction
22 | DoorCommand.Request reverse_command = 20;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot/door_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot;
10 | option go_package = "bosdyn/api/spot/door_service";
11 | option java_outer_classname = "DoorCommandServiceProto";
12 |
13 | import "bosdyn/api/spot/door.proto";
14 |
15 | service DoorService {
16 | rpc OpenDoor(OpenDoorCommandRequest) returns (OpenDoorCommandResponse) {}
17 |
18 | rpc OpenDoorFeedback(OpenDoorFeedbackRequest) returns (OpenDoorFeedbackResponse) {}
19 | }
20 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot/inverse_kinematics_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot;
10 | option go_package = "bosdyn/api/spot/inverse_kinematics_service";
11 |
12 | option java_outer_classname = "InverseKinematicsServiceProto";
13 |
14 | import "bosdyn/api/spot/inverse_kinematics.proto";
15 |
16 |
17 | service InverseKinematicsService {
18 | rpc InverseKinematics(InverseKinematicsRequest) returns (InverseKinematicsResponse) {}
19 | }
20 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot/spot_check_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot;
10 | option go_package = "bosdyn/api/spot/spot_check_service";
11 |
12 | option java_outer_classname = "SpotCheckServiceProto";
13 |
14 | import "bosdyn/api/spot/spot_check.proto";
15 |
16 | // RPCs for monitoring robot health and recalibration various sensors. These procedures should be
17 | // run periodically in order to keep the system running in the best possible condition.
18 | service SpotCheckService {
19 | // Send a command to the SpotCheck service. The spotcheck service is responsible to both
20 | // recalibrating actuation sensors and checking camera health.
21 | rpc SpotCheckCommand(SpotCheckCommandRequest) returns (SpotCheckCommandResponse) {}
22 |
23 | // Check the status of the spot check procedure. After procedure completes, this reports back
24 | // results for specific joints and cameras.
25 | rpc SpotCheckFeedback(SpotCheckFeedbackRequest) returns (SpotCheckFeedbackResponse) {}
26 |
27 |
28 |
29 | // Send a camera calibration command to the robot. Used to start or abort a calibration routine.
30 | rpc CameraCalibrationCommand(CameraCalibrationCommandRequest)
31 | returns (CameraCalibrationCommandResponse) {}
32 |
33 | // Check the status of the camera calibration procedure.
34 | rpc CameraCalibrationFeedback(CameraCalibrationFeedbackRequest)
35 | returns (CameraCalibrationFeedbackResponse) {}
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot/spot_constants.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot;
10 | option go_package = "bosdyn/api/spot/spot_constants";
11 |
12 |
13 | // Joint indexing
14 | enum JointIndex {
15 | JOINT_INDEX_FL_HX = 0;
16 | JOINT_INDEX_FL_HY = 1;
17 | JOINT_INDEX_FL_KN = 2;
18 | JOINT_INDEX_FR_HX = 3;
19 | JOINT_INDEX_FR_HY = 4;
20 | JOINT_INDEX_FR_KN = 5;
21 | JOINT_INDEX_HL_HX = 6;
22 | JOINT_INDEX_HL_HY = 7;
23 | JOINT_INDEX_HL_KN = 8;
24 | JOINT_INDEX_HR_HX = 9;
25 | JOINT_INDEX_HR_HY = 10;
26 | JOINT_INDEX_HR_KN = 11;
27 | JOINT_INDEX_A0_SH0 = 12;
28 | JOINT_INDEX_A0_SH1 = 13;
29 | JOINT_INDEX_A0_EL0 = 14;
30 | JOINT_INDEX_A0_EL1 = 15;
31 | JOINT_INDEX_A0_WR0 = 16;
32 | JOINT_INDEX_A0_WR1 = 17;
33 | JOINT_INDEX_A0_F1X = 18;
34 | }
35 |
36 | // Leg indexing
37 | enum LegIndex {
38 | LEG_INDEX_FL = 0;
39 | LEG_INDEX_FR = 1;
40 | LEG_INDEX_HL = 2;
41 | LEG_INDEX_HR = 3;
42 | }
43 |
44 | enum LegDofOrder {
45 | HX = 0;
46 | HY = 1;
47 | KN = 2;
48 | }
49 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot_cam/LED.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot_cam;
10 | option go_package = "bosdyn/api/spot_cam/LED";
11 |
12 | option java_outer_classname = "LightingProto";
13 |
14 | import "bosdyn/api/header.proto";
15 |
16 | // Request the current state of LEDs on the SpotCam.
17 | message GetLEDBrightnessRequest {
18 | // Common request header.
19 | bosdyn.api.RequestHeader header = 1;
20 | }
21 |
22 | // Describes the current brightnesses of all LEDs.
23 | message GetLEDBrightnessResponse {
24 | // Common response header.
25 | bosdyn.api.ResponseHeader header = 1;
26 | // Brightness [0, 1] of the LED located at indices [0, 3].
27 | repeated float brightnesses = 2;
28 | }
29 |
30 | // Set individual LED brightnesses.
31 | message SetLEDBrightnessRequest {
32 | // Common request header.
33 | bosdyn.api.RequestHeader header = 1;
34 | // Brightness [0, 1] to assign to the LED located at indices [0, 3].
35 | map brightnesses = 2;
36 | }
37 |
38 | // Response with any errors setting LED brightnesses.
39 | message SetLEDBrightnessResponse {
40 | // Common response header.
41 | bosdyn.api.ResponseHeader header = 1;
42 | }
43 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/spot_cam/version.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api.spot_cam;
10 | option go_package = "bosdyn/api/spot_cam/version";
11 |
12 | option java_outer_classname = "VersionProto";
13 |
14 | import "bosdyn/api/header.proto";
15 | import "bosdyn/api/robot_id.proto";
16 |
17 | // Request the software version running on the SpotCam.
18 | message GetSoftwareVersionRequest {
19 | // Common request header.
20 | bosdyn.api.RequestHeader header = 1;
21 | }
22 |
23 | // Provide the SpotCam's software release version.
24 | message GetSoftwareVersionResponse {
25 | // Common response header.
26 | bosdyn.api.ResponseHeader header = 1;
27 | // Version of the software currently running on the SpotCam.
28 | bosdyn.api.SoftwareVersion version = 2;
29 | // Extra detail about the version of software running on spotcam.
30 | // May contain metadata about build dates and configuration.
31 | string detail = 3;
32 | }
33 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/synchronized_command.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/synchronized_command";
11 |
12 | option java_outer_classname = "SynchronizedCommandProto";
13 |
14 | import "bosdyn/api/arm_command.proto";
15 | import "bosdyn/api/gripper_command.proto";
16 | import "bosdyn/api/mobility_command.proto";
17 |
18 | message SynchronizedCommand {
19 | message Request {
20 | ArmCommand.Request arm_command = 1;
21 | MobilityCommand.Request mobility_command = 2;
22 | GripperCommand.Request gripper_command = 3;
23 |
24 | }
25 |
26 | message Feedback {
27 | ArmCommand.Feedback arm_command_feedback = 1;
28 | MobilityCommand.Feedback mobility_command_feedback = 2;
29 | GripperCommand.Feedback gripper_command_feedback = 3;
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/time_range.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/time_range";
11 | option java_outer_classname = "TimeRangeProto";
12 |
13 | import "google/protobuf/timestamp.proto";
14 |
15 | // Representation of a time range from a start time through an end time.
16 | message TimeRange {
17 | google.protobuf.Timestamp start = 1;
18 | google.protobuf.Timestamp end = 2;
19 | }
20 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/time_sync_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/time_sync_service";
11 |
12 | option java_outer_classname = "TimeSyncServiceProto";
13 |
14 | import "bosdyn/api/time_sync.proto";
15 |
16 | // The time-sync service estimates the difference between server and client clocks.
17 | // Time synchronization is a tool which allows applications to work in a unified timebase with
18 | // precision. It is useful in cases where a precise time must be set, independently of network
19 | // communication lag. In distributed systems and robotics, hardware, system-level, and per-process
20 | // approaches can be used to obtain synchronization.
21 | // This service implements a stand alone time synchronization service. It enables clients to
22 | // establish a per-process offset between two processes which may be on separate systems.
23 | service TimeSyncService {
24 | // See the exchange documentation in time_sync.proto. This call makes one client/server
25 | // round trip toward clock synchronization.
26 | rpc TimeSyncUpdate(TimeSyncUpdateRequest) returns (TimeSyncUpdateResponse) {}
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/units.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/units";
11 |
12 | option java_outer_classname = "UnitsProto";
13 |
14 | enum TemperatureEnum {
15 | TEMPERATURE_UNKNOWN = 0;
16 | TEMPERATURE_KELVIN = 1;
17 | TEMPERATURE_CELSIUS = 2;
18 | TEMPERATURE_FAHRENHEIT = 3;
19 | }
20 |
21 | enum PressureEnum {
22 | PRESSURE_UNKNOWN = 0;
23 | PRESSURE_PSI = 1; // Pound-force per square inch
24 | PRESSURE_KPA = 2; // KiloPascal
25 | PRESSURE_BAR = 3; // Bar
26 | }
27 |
28 |
29 | message Units {
30 | oneof units {
31 | string name = 1; // Use this field if the desired unit is not a supported enum.
32 | TemperatureEnum temp = 2;
33 | PressureEnum press = 3;
34 |
35 | }
36 |
37 | // If a service wants an absolute temperature threshold between 0 C and 100 C, that would show
38 | // up as 32 F to 212 F on any Fahrenheit loving clients IF is_relative is set to false. Note
39 | // the change from 0 C to 32 F.
40 | //
41 | // If a service wants a relative temperate threshold (region A must be no more than X degrees
42 | // hotter than region B), between 0 and 100 C, that would show up as 0 F to 180 F on any
43 | // Fahrenheit loving clients IF is_relative is set to true. Note that 0 C now maps to 0 F.
44 | //
45 | // NOTE: Only relevant for units with non equal zero points.
46 | bool is_relative = 4;
47 | }
48 |
--------------------------------------------------------------------------------
/protos/bosdyn/api/world_object_service.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
2 | //
3 | // Downloading, reproducing, distributing or otherwise using the SDK Software
4 | // is subject to the terms and conditions of the Boston Dynamics Software
5 | // Development Kit License (20191101-BDSDK-SL).
6 |
7 | syntax = "proto3";
8 |
9 | package bosdyn.api;
10 | option go_package = "bosdyn/api/world_object_service";
11 |
12 | option java_outer_classname = "WorldObjectServiceProto";
13 |
14 | import "bosdyn/api/world_object.proto";
15 |
16 | // The world object service provides a way to track and store objects detected in the world around
17 | // the robot.
18 | service WorldObjectService {
19 | // Request a list of all the world objects in the robot's perception scene.
20 | rpc ListWorldObjects(ListWorldObjectRequest) returns (ListWorldObjectResponse) {}
21 |
22 | // Mutate (add, change, or delete) the world objects.
23 | rpc MutateWorldObjects(MutateWorldObjectRequest) returns (MutateWorldObjectResponse) {}
24 |
25 | }
26 |
--------------------------------------------------------------------------------