Git Product home page Git Product logo

cyberdog_ctrl's Introduction

CyberDog_Ctrl

en 该demo使用python实现的gRPC client向cyberdog发送控制指令,通信协议为官方开源cyberdog_app.proto ,但因无具体协议说明文档,只能靠手机端App使用方式推测具体接口的使用方法。

目前能实现基础的移动控制与基础的动作指令控制。

依赖安装

  • grpc:sudo pip install grpcio (运行需要)

  • grpc-tools:sudo pip install grpcio-tools (cyberdog_app.proto编译需要)

  • keyboard:sudo pip install keyboard (运行需要)

    因为keyboard模块需要root权限,为防止sudo模式运行python文件找不到模块,统一使用sudo install,其他环境请自行调整

协议编译

下载官方通信协议:cyberdog_app.proto

放入make_proto.bash同级目录下,运行make_proto.bash

成功后会生成cyberdog_app_pb2.pycyberdog_app_pb2_grpc.py

gRPC 协议调用

本demo采用Python编写,但gRPC支持c++,c#, Go,Java,Node,php,ruby,objective-c

官方文档:中文——GitHub

官方gRPC Python教程

Demo使用

使用官方CyberdogApp正确连接铁蛋,进入遥控界面后左上角会显示铁蛋的IP地址

将PC连接到铁蛋相同的网络环境下

运行:sudo python3 cyberdog_ctrl.py

按提示输入模式选择与IP地址

  • RunOrderCMD:

    将执行以下动作:

    • 站起来
    • 握手动作
    • 趴下去
  • RunMoveCMD:

    将执行以下动作:

    • 站起来
    • 切换为小跑步态
    • 按指令进行移动
    • 趴下去

cyberdog_ctrl's People

Contributors

duzhonghua avatar homalozoa avatar karlsx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cyberdog_ctrl's Issues

Always getting "Connect error, Timeout" when running the program.

I followed the instructions of README and connected PC and Cyberdog2 under the same hotspot, but I still got "Connect error, Timeout" error every time. I tried to enlarge the timeout to 100 but it doesn't work. Can you kindly give me some advice on how to solve the problem? Many thanks!

Error when use "make_proto.bash"

您好,想请问下:

  1. 是否是直接远程ssh连接四足之后,下载这个包和cyberdog_app.proto
  2. 运行“./make_proto.bash”, 出现报错:

-bash: ./make_proto.bash: /usr/bin/bash: bad interpreter: No such file or directory
请问如何解决?


修改:
重新修改了make_proto.bash中,将“/usr/bin/bash”改成“/bin/bash”, 然后报错如下:

Could not make proto path relative: *.proto: No such file or directory


还有 向请问下:

下载官方通信协议:cyberdog_app.proto
放入make_proto.bash同级目录下,运行make_proto.bash

不太理解阿,CyberDog ROS 2已经在ros app这个pkg中编译了,这块为什么还要下载呢?

谢谢回复

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.