Example code warehouse address
https://gitee.com/HUAWEI-ASCEND/quadruped-robot
lab environment
OS: Ubuntu 20.04
CPU: Intel® Xeon® Gold 6278C CPU @ 2.60GHz
Memory: 16GB
prepare the environment
Install Intel OneAPI Base Kit (not required)
What is Intel OneAPI
Intel oneAPI is a cross-industry, open, standards-based unified programming model that provides a unified experience for developers across CPUs, GPUs, FPGAs, and dedicated accelerators. It consists of two components: an industry plan and an Intel beta product.
The oneAPI open specification is based on industry standards and existing developer programming models, and is widely applicable to different architectures and hardware from different suppliers. The oneAPI industry plan encourages cooperation within the ecosystem based on the oneAPI specification and oneAPI-compatible practices.
Intel's oneAPI product is Intel's oneAPI-based implementation, which includes oneAPI standard components such as direct programming tools (Data Parallel C++), API-based programming tools with a series of performance libraries, and advanced analysis and debugging tools. Developers can now use Intel DevCloud for oneAPI for code and application for testing.
In general, Intel oneAPI is just a programming model and an industry specification, and Intel oneAPI-related products such as Intel oneAPI Base Toolkit, Intel oneAPI HPC Toolkit, and Intel AI Analytics Toolkit are products developed based on the programming model of Intel oneAPI .
oneAPI is an open specification that includes a cross-architecture programming language Data Parallel C++ (DPC++), a set of function libraries for API programming, and the underlying hardware interface (oneAPI Level Zero). With these components, Intel and other companies can create their own implementation of oneAPI to support their own products, or develop new products based on oneAPI.
References
If you are interested in OneAPI, you can refer to this article:
https://www.zhihu.com/tardis/zm/art/103299140
Note: If you just want to complete the follow-up experiment, you don’t need to install this kit. After all, the kit is still relatively large. If you want to mess around, you can try to install it
Install
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7deeaac4-f605-4bcf-a81b-ea7531577c61/l_BaseKit_p_2023.1.0.46401_offline.sh
sudo sh ./l_BaseKit_p_2023.1.0.46401_offline.sh
Add environment variables to ~/.bashrc
the end of the file
source /opt/intel/oneapi/setvars.sh
Install ROS
Xiaoyu one-click installation (recommended)
URL: https://fishros.org.cn/forum/topic/20/One-click installation series of Xiaoyu?lang=zh-CN
wget http://fishros.com/install -O fishros && . fishros
During the installation process, you can choose according to the text prompts combined with actual needs (in most cases, choose 1, and choose the one to replace the mirror image according to your own needs)
Note: I personally recommend using the ROS1.0 environment for experiments
Install the emulator
The installation environment depends on
sudo apt install libyaml-cpp-dev
sudo apt install libeigen3-dev
sudo apt install liblcm-dev
sudo apt install libglm-dev
catkin_ws initialization
mkdir catkin_ws
cd catkin_ws
mkdir src
cd src
git clone https://gitee.com/HUAWEI-ASCEND/quadruped-robot
cd ..
catkin_make
Note: If Intel OneAPI is not installed, there will be a prompt that the BLAS API cannot be found or the BLAS LIB cannot be found. Solution
:
You can quadruped-robot/model-control/quadruped/CMakeLists.txt
comment out the BLAS-related code in the file, or USE_BLAS
set it to OFF in the configuration file
source environment variable
source devel/setup.bash
Note: You need to execute this command every time you open a new terminal, so if there is only one in the environment catkin_ws
, you can actually add the absolute path of the file to ~/.bashrc
the end of the file, so that the environment variable will be automatically loaded every time you boot
run
Run the Gazebo emulator
roslaunch qr_gazebo gazebo_startup.launch wname:=earth
Start the first robot model
roslaunch qr_gazebo model_spawn.launch rname:=a1 use_xacro:=true use_camera:=false
run an example
rosrun examples example_a1_sim
run a control panel
rosrun examples example_keyboard