GithubHelp home page GithubHelp logo

unitree_ros_to_real's Introduction

Packages Version: v3.5.0

Introduction

This package can send control command to real robot from ROS. You can do low-level control(namely control all joints on robot) and high-level control(namely control the walking direction and speed of robot).

This version is suitable for unitree_legged_sdk v3.5.1, namely Go1 robot.

Packages:

Basic message function: unitree_legged_msgs

The interface between ROS and real robot: unitree_legged_real

Environment

We recommand users to run this package in Ubuntu 18.04 and ROS melodic environment

Dependencies

Configuration

Before compiling this package, users have to download unitree_legged-sdk v.3.5.1 to ~/catkin_ws/src folder, which is the same folder where you put this package into

Build

You can use catkin_make to build ROS packages. First copy the package folder to ~/catkin_ws/src, then:

cd ~/catkin_ws
catkin_make

Setup the net connection

First, please connect the network cable between your PC and robot. Then run ifconfig in a terminal, you will find your port name. For example, enx000ec6612921.

Then, open the ipconfig.sh file under the folder unitree_legged_real, modify the port name to your own. And run the following commands:

sudo chmod +x ipconfig.sh
sudo ./ipconfig.sh

If you run the ifconfig again, you will find that port has inet and netmask now. In order to set your port automatically, you can modify interfaces:

sudo gedit /etc/network/interfaces

And add the following 4 lines at the end:

auto enx000ec6612921
iface enx000ec6612921 inet static
address 192.168.123.162
netmask 255.255.255.0

Where the port name have to be changed to your own.

Run the package

You can control your real Go1 robot from ROS by this package.

Before you run expamle program, please run command

roslaunch unitree_legged_real real.launch ctrl_level:=highlevel

or

roslaunch unitree_legged_real real.launch ctrl_level:=lowlevel

It depends which control mode you want to use.

Then, if you want to run high-level control mode, you can run example_walk node like this

rosrun unitree_legged_real example_walk

If you want to run low-level control mode, you can run example_position program node like this

rosrun unitree_legged_real example_postion

You can also run the node state_sub to subscribe the feedback information from Go1 robot

rosrun unitree_legged_real state_sub

You can also run the launch file that enables you control robot via keyboard like you can do in turtlesim package

roslaunch unitree_legged_real keyboard_control.launch

And before you do the low-level control, please press L2+A to sit the robot down and then press L1+L2+start to make the robot into mode in which you can do joint-level control, finally make sure you hang the robot up before you run low-level control.

unitree_ros_to_real's People

Contributors

zkbian avatar jonasfovea avatar

unitree_ros_to_real's Issues

UDP ports are blocked

The new initialization of the Custom object reruns the port binding of the udp ports.

It's necessary to change the reference of the Custom object to a pointer and initialize it later on.

This also leads to the necessity of changing all of its usages.

An alternative would be to implement an empty standard constructor and later initialize the object.

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.