Skip to content

Commit 6ea7828

Browse files
committed
try fixing protogen
1 parent d9413c9 commit 6ea7828

File tree

3 files changed

+62
-10
lines changed

3 files changed

+62
-10
lines changed

.github/workflows/update_protos.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,54 @@
11
name: Update Protos + Open PR
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
47
workflow_dispatch:
58
repository_dispatch:
69
types:
710
- protos-updated
811

912
jobs:
1013
update-protos:
11-
if: github.repository_owner == 'viamrobotics'
14+
#if: github.repository_owner == 'viamrobotics'
1215
runs-on: ubuntu-latest
1316
container:
1417
image: ghcr.io/viamrobotics/canon:amd64
1518
steps:
1619
- uses: actions/checkout@v4
17-
- name: setup-grpc
20+
- name: install dependencies
1821
run: |
19-
git clone https://github.com/Microsoft/vcpkg.git \
20-
&& cd vcpkg && ./bootstrap-vcpkg.sh && ./vcpkg integrate install \
21-
&& ./vcpkg install grpc \
22-
&& ./vcpkg install upb
23-
- name: setup-openssl
24-
run: apt-get update && sudo apt-get -y --no-install-recommends install libssl-dev
22+
apt-get update
23+
apt-get -y dist-upgrade
24+
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
25+
build-essential \
26+
ca-certificates \
27+
curl \
28+
g++ \
29+
gdb \
30+
gnupg \
31+
gpg \
32+
less \
33+
libboost-all-dev \
34+
libgrpc++-dev \
35+
libprotobuf-dev \
36+
libssl-dev \
37+
ninja-build \
38+
pkg-config \
39+
protobuf-compiler \
40+
protobuf-compiler-grpc \
41+
software-properties-common \
42+
sudo \
43+
wget \
44+
#- name: setup-grpc
45+
#run: |
46+
#git clone https://github.com/Microsoft/vcpkg.git \
47+
#&& cd vcpkg && ./bootstrap-vcpkg.sh && ./vcpkg integrate install \
48+
#&& ./vcpkg install grpc \
49+
#&& ./vcpkg install upb
50+
#- name: setup-openssl
51+
#run: apt-get update && sudo apt-get -y --no-install-recommends install libssl-dev
2552
- uses: MarkusJx/[email protected]
2653
with:
2754
boost_version: 1.81.0
@@ -34,8 +61,10 @@ jobs:
3461
- uses: arduino/setup-protoc@v1
3562
- name: Update buf
3663
run: |
37-
cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON -DCMAKE_PREFIX_PATH=./vcpkg/installed/x64-linux/share \
38-
&& cmake --build ./build --target update-buf
64+
cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON && cmake --build ./build --target update-buf
65+
#run: |
66+
#cmake -B build -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON -DCMAKE_PREFIX_PATH=./vcpkg/installed/x64-linux/share \
67+
#&& cmake --build ./build --target update-buf
3968
env:
4069
BOOST_ROOT: ${{ github.workspace }}/boost/boost
4170
- name: Generate buf

src/viam/sdk/robot/client.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,5 +355,16 @@ void RobotClient::stop_all(const std::unordered_map<Name, ProtoStruct>& extra) {
355355
}
356356
}
357357

358+
// RobotClient::status RobotClient::get_machine_status() const {
359+
// robot::v1::GetMachineStatusResponse resp;
360+
// resp.config();
361+
// return make_client_helper(this, *impl_->stub_, &StubType::GetMachineStatus)
362+
//.invoke([](auto& response) {
363+
// switch (response.state) {
364+
// case
365+
// }
366+
// });
367+
//}
368+
358369
} // namespace sdk
359370
} // namespace viam

src/viam/sdk/robot/client.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ namespace sdk {
3434
/// `with_channel` require a user call to `close()`.
3535
class RobotClient {
3636
public:
37+
/// @enum status
38+
/// @brief the current status of the robot
39+
/// @ingroup Robot
40+
// enum class status : uint8_t {
41+
// k_initializing,
42+
// k_running,
43+
// k_unspecified,
44+
//};
45+
3746
struct frame_system_config {
3847
WorldState::transform frame;
3948
ProtoStruct kinematics;
@@ -132,6 +141,9 @@ class RobotClient {
132141
/// @param id The ID of the operation to cancel.
133142
void cancel_operation(std::string id);
134143

144+
/// @brief gets the current status of the machine
145+
// status get_machine_status() const;
146+
135147
private:
136148
std::vector<std::shared_ptr<std::thread>> threads_;
137149
std::atomic<bool> should_refresh_;

0 commit comments

Comments
 (0)