Skip to content

Unitree DDS Wrapper to simplify the communication with Unitree Robots

License

Notifications You must be signed in to change notification settings

unitreerobotics/unitree_dds_wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unitree DDS Wrapper

This project aims to simplify the communication with Unitree Robots. unitree_dds_wrapper provides {robot}_sub, ${robot}_pub classes, Generated by IDL, with default values added

Installation

Execute the following commands in the terminal:

git clone https://github.com/unitreerobotics/unitree_dds_wrapper.git
conda install pinocchio -c conda-forge
cd unitree_dds_wrapper/python
pip3 install -e . 

Usage

If unitree_dds_wrapper has been installed successfully, then do a simple test:

from unitree_dds_wrapper.publisher import Publisher
from unitree_dds_wrapper.subscription import Subscription
from unitree_dds_wrapper.idl import unitree_go
import time

msg_type = unitree_go.msg.dds_.LowState_
pub = Publisher(message=msg_type, topic="rt/test_dds")
sub = Subscription(message=msg_type, topic="rt/test_dds")

while True:
  pub.msg.level_flag = 1 - pub.msg.level_flag
  pub.write()
  time.sleep(0.5)

  print("send: ", pub.msg.level_flag)

  if sub.msg:
    print("receive: ", sub.msg.level_flag)

About

Unitree DDS Wrapper to simplify the communication with Unitree Robots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages