Code Monkey home page Code Monkey logo

cheetah_ros's Introduction

THIS README IS CURRENTLY OUT OF DATE.

cheetah_ros

Overview

ROS and ros-control interface and some controllers for quadruped robots.

Keywords: example, package, template

License

The source code is released under a BSD 3-Clause license.

Author: QiayuanLiao
Maintainer: QiayuanLiao, [email protected]

The unitree_ros package has been tested under ROS Noetic on respectively Ubuntu 20.04. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.

Installation

Building from Source

Dependencies

Install all dependence in one command:

sudo rosdep install --from-paths src

Building

To build from source, clone the latest version from this repository into your catkin workspace and compile the package using

cd catkin_workspace/src
git clone [email protected]:qiayuanliao/unitree_ros.git
cd ../
rosdep install --from-paths . --ignore-src
catkin build # or catkin_make

Usage

Quick start

Set your robot type(a1 or aliengo) as an environment variable: ROBOT_TYPE

export ROBOT_TYPE=aliengo #export ROBOT_TYPE=a1

Launch the simulation by:

mon launch unitree_gazebo empty_world.launch hung_up:=true

Load all basic controllers by:

mon launch unitree_control load_controllers.launch

You can start the controller using rqt_controller_manager

sudo apt install ros-noetic-rqt-controller-manager
rosrun rqt_controller_manager rqt_controller_manager

Start a controller by right clik and select start.

  • Start joint_state_controller then you can get the joint states by topic /joint_states
  • If you only what to control the foot position velocity and force in cartesian space by topic /cmd_legs, start the legs_controller;
  • If you also what to let the foot follow a bezier trajectory by topic /cmd_feet, start the feets_controller
  • TODO: Some detail about these controllers

NOTE: The legs_controller and feet_controller should not running in the same time!

After start the controller (for example: feet_controller), you can control the leg/legs or foot/feet by sending message to topic, like the command line code above command FL foot follow a bezier cure with height 0.1 meter and finally reach the position {x: 0.0, y: 0.0, z: 0.7} in 0.5 second.

rostopic pub /cmd_feet unitree_msgs/FeetCmd "header:
  seq: 0
  stamp: {secs: 1, nsecs: 0}
  frame_id: ''
leg_prefix:
- {prefix: 0}
touch_state: [1]
ground_reaction_force:
- {x: 0.0, y: 0.0, z: 0.0}
pos_final:
- {x: 0.0, y: 0.0, z: 0.7}
height: [0.1]
swing_time: [0.5]"

You can try other legs and final position or write another node to perform some high level control. DON'T FORGET TO UPDATE THE TIME STAMP OF EACH MESSAGE!!! 不要忘记更新每个消息的时间戳!!!

The gif below shows a loop action command by a simple script.

However, using the ROS topic interface in high frequency and real-time requirements is NOT RECOMMEND and UNSAFE.

You had better inherit from legs_controller or feet_controller as the base class, create a new controller running in the hardware_interface, which allow you command the leg or joint directly using pointer in 1kHz and real-time safe . TODO shows a locomotion controller base on Cheetah-Software .

Bugs & Feature Requests

Please report bugs and request features using the Issue Tracker .

cheetah_ros's People

Contributors

qiayuanl avatar

Watchers

 avatar

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.