diff --git a/README.md b/README.md index 1ccadbd..89eae5b 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,18 @@ # Introduction -Here are the ROS simulation packages of Unitree robots, You can load robots and joint controllers in Gazebo, so you can do low-level control(control the torque, position and angular velocity) on the robot joints. Please watch out that the Gazebo simulation cannot do high-level control, namely walking. Besides of these simulation functions, you can also control your real robots in ROS by the [unitree_legged_real](https://github.com/unitreerobotics) package. For real robots, you can do high-level and low-level control by our ROS packages. +Here are the ROS simulation packages of Unitree robots, You can load robots and joint controllers in Gazebo, so you can do low-level control(control the torque, position and angular velocity) on the robot joints. Please watch out that the Gazebo simulation cannot do high-level control, namely walking. Besides of these simulation functions, you can also control your real robots in ROS by the [unitree_ros_to_real](https://github.com/unitreerobotics) packages. For real robots, you can do high-level and low-level control by our ROS packages. ## Packages: Robot description: `go1_description`, `a1_description`, `aliengo_description`, `laikago_description` Robot and joints controller: `unitree_controller` -Basic message function: `unitree_legged_msgs` - Simulation related: `unitree_gazebo`, `unitree_legged_control` - - # Dependencies * [ROS](https://www.ros.org/) melodic or ROS kinetic(has not been tested) * [Gazebo8](http://gazebosim.org/) - +* [unitree_legged_msgs](https://github.com/unitreerobotics/unitree_ros): `unitree_legged_msgs` is a package under [unitree_ros_to_real](https://github.com/unitreerobotics/unitree_ros). # Build - - If your ROS is melodic: @@ -50,10 +44,6 @@ If you face a dependency problem, you can just run `catkin_make` again. ## unitree_legged_control: It contains the joints controllers for Gazebo simulation, which allows users to control joints with position, velocity and torque. Refer to "unitree_ros/unitree_controller/src/servo.cpp" for joint control examples in different modes. -## unitree_legged_msgs: -ros-type message, including command and state of high-level and low-level control. -It would be better if it be compiled firstly, otherwise you may have dependency problems (such as that you can't find the header file). - ## The description of robots: Namely the description of Go1, A1, Aliengo and Laikago. Each package include mesh, urdf and xacro files of robot. Take Laikago as an example, you can check the model in Rviz by: ``` diff --git a/unitree_legged_msgs/CMakeLists.txt b/unitree_legged_msgs/CMakeLists.txt deleted file mode 100644 index 4ae8a82..0000000 --- a/unitree_legged_msgs/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(unitree_legged_msgs) - -find_package(catkin REQUIRED COMPONENTS - message_generation - std_msgs - geometry_msgs - sensor_msgs -) - -add_message_files( - FILES - MotorCmd.msg - MotorState.msg - Cartesian.msg - IMU.msg - LED.msg - LowCmd.msg - LowState.msg - HighCmd.msg - HighState.msg -) - -generate_messages( - DEPENDENCIES - std_msgs - geometry_msgs - sensor_msgs -) - -catkin_package( - CATKIN_DEPENDS - message_runtime - std_msgs - geometry_msgs - sensor_msgs -) - -############# -## Install ## -############# - -# Mark topic names header files for installation -install( - DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} - FILES_MATCHING PATTERN "*.h" -) \ No newline at end of file diff --git a/unitree_legged_msgs/msg/Cartesian.msg b/unitree_legged_msgs/msg/Cartesian.msg deleted file mode 100644 index 0fb5429..0000000 --- a/unitree_legged_msgs/msg/Cartesian.msg +++ /dev/null @@ -1,3 +0,0 @@ -float32 x -float32 y -float32 z \ No newline at end of file diff --git a/unitree_legged_msgs/msg/HighCmd.msg b/unitree_legged_msgs/msg/HighCmd.msg deleted file mode 100644 index 65aa796..0000000 --- a/unitree_legged_msgs/msg/HighCmd.msg +++ /dev/null @@ -1,19 +0,0 @@ -uint8 levelFlag -uint16 commVersion # Old version Aliengo does not have -uint16 robotID # Old version Aliengo does not have -uint32 SN # Old version Aliengo does not have -uint8 bandWidth # Old version Aliengo does not have -uint8 mode -float32 forwardSpeed -float32 sideSpeed -float32 rotateSpeed -float32 bodyHeight -float32 footRaiseHeight -float32 yaw -float32 pitch -float32 roll -LED[4] led -uint8[40] wirelessRemote -uint8[40] AppRemote # Old version Aliengo does not have -uint32 reserve # Old version Aliengo does not have -int32 crc \ No newline at end of file diff --git a/unitree_legged_msgs/msg/HighState.msg b/unitree_legged_msgs/msg/HighState.msg deleted file mode 100644 index 08fa238..0000000 --- a/unitree_legged_msgs/msg/HighState.msg +++ /dev/null @@ -1,26 +0,0 @@ -uint8 levelFlag -uint16 commVersion # Old version Aliengo does not have -uint16 robotID # Old version Aliengo does not have -uint32 SN # Old version Aliengo does not have -uint8 bandWidth # Old version Aliengo does not have -uint8 mode -IMU imu -float32 forwardSpeed -float32 sideSpeed -float32 rotateSpeed -float32 bodyHeight -float32 updownSpeed -float32 forwardPosition # (will be float type next version) # Old version Aliengo is different -float32 sidePosition # (will be float type next version) # Old version Aliengo is different -Cartesian[4] footPosition2Body -Cartesian[4] footSpeed2Body -int16[4] footForce # Old version Aliengo is different -int16[4] footForceEst # Old version Aliengo does not have -uint32 tick -uint8[40] wirelessRemote -uint32 reserve # Old version Aliengo does not have -uint32 crc - -# Under are not defined in SDK yet. # Old version Aliengo does not have -Cartesian[4] eeForce # It's a 1-DOF force in real robot, but 3-DOF is better for visualization. -float32[12] jointP # for visualization \ No newline at end of file diff --git a/unitree_legged_msgs/msg/IMU.msg b/unitree_legged_msgs/msg/IMU.msg deleted file mode 100644 index 71c741a..0000000 --- a/unitree_legged_msgs/msg/IMU.msg +++ /dev/null @@ -1,4 +0,0 @@ -float32[4] quaternion -float32[3] gyroscope -float32[3] accelerometer -int8 temperature \ No newline at end of file diff --git a/unitree_legged_msgs/msg/LED.msg b/unitree_legged_msgs/msg/LED.msg deleted file mode 100644 index 6f07b24..0000000 --- a/unitree_legged_msgs/msg/LED.msg +++ /dev/null @@ -1,3 +0,0 @@ -uint8 r -uint8 g -uint8 b \ No newline at end of file diff --git a/unitree_legged_msgs/msg/LowCmd.msg b/unitree_legged_msgs/msg/LowCmd.msg deleted file mode 100644 index 62f28ba..0000000 --- a/unitree_legged_msgs/msg/LowCmd.msg +++ /dev/null @@ -1,12 +0,0 @@ -uint8 levelFlag -uint16 commVersion # Old version Aliengo does not have -uint16 robotID # Old version Aliengo does not have -uint32 SN # Old version Aliengo does not have -uint8 bandWidth # Old version Aliengo does not have -MotorCmd[20] motorCmd -LED[4] led -uint8[40] wirelessRemote -uint32 reserve # Old version Aliengo does not have -uint32 crc - -Cartesian[4] ff # will delete # Old version Aliengo does not have \ No newline at end of file diff --git a/unitree_legged_msgs/msg/LowState.msg b/unitree_legged_msgs/msg/LowState.msg deleted file mode 100644 index 2614fa6..0000000 --- a/unitree_legged_msgs/msg/LowState.msg +++ /dev/null @@ -1,20 +0,0 @@ -uint8 levelFlag -uint16 commVersion # Old version Aliengo does not have -uint16 robotID # Old version Aliengo does not have -uint32 SN # Old version Aliengo does not have -uint8 bandWidth # Old version Aliengo does not have -IMU imu -MotorState[20] motorState -int16[4] footForce # force sensors # Old version Aliengo is different -int16[4] footForceEst # force sensors # Old version Aliengo does not have -uint32 tick # reference real-time from motion controller (unit: us) -uint8[40] wirelessRemote # wireless commands -uint32 reserve # Old version Aliengo does not have -uint32 crc - -# Old version Aliengo does not have: -Cartesian[4] eeForceRaw -Cartesian[4] eeForce #it's a 1-DOF force infact, but we use 3-DOF here just for visualization -Cartesian position # will delete -Cartesian velocity # will delete -Cartesian velocity_w # will delete diff --git a/unitree_legged_msgs/msg/MotorCmd.msg b/unitree_legged_msgs/msg/MotorCmd.msg deleted file mode 100644 index 668fd45..0000000 --- a/unitree_legged_msgs/msg/MotorCmd.msg +++ /dev/null @@ -1,7 +0,0 @@ -uint8 mode # motor target mode -float32 q # motor target position -float32 dq # motor target velocity -float32 tau # motor target torque -float32 Kp # motor spring stiffness coefficient -float32 Kd # motor damper coefficient -uint32[3] reserve # motor target torque \ No newline at end of file diff --git a/unitree_legged_msgs/msg/MotorState.msg b/unitree_legged_msgs/msg/MotorState.msg deleted file mode 100644 index 8e326b0..0000000 --- a/unitree_legged_msgs/msg/MotorState.msg +++ /dev/null @@ -1,10 +0,0 @@ -uint8 mode # motor current mode -float32 q # motor current position(rad) -float32 dq # motor current speed(rad/s) -float32 ddq # motor current speed(rad/s) -float32 tauEst # current estimated output torque(N*m) -float32 q_raw # motor current position(rad) -float32 dq_raw # motor current speed(rad/s) -float32 ddq_raw # motor current speed(rad/s) -int8 temperature # motor temperature(slow conduction of temperature leads to lag) -uint32[2] reserve \ No newline at end of file diff --git a/unitree_legged_msgs/package.xml b/unitree_legged_msgs/package.xml deleted file mode 100644 index a0a1d19..0000000 --- a/unitree_legged_msgs/package.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - unitree_legged_msgs - 0.0.0 - - The test messgaes package. - - unitree - TODO - - catkin - message_runtime - message_generation - std_msgs - geometry_msgs - sensor_msgs - - \ No newline at end of file