ubuntu20.04仿真复现legged_control

复现legged_control

legged_control 是一个基于 OCS2 和 ros-control 的 NMPC-WBC 机器人控制栈和框架。

廖洽源githublegged control主页

相关库安装

复制代码
git clone https://github.com/qiayuanl/legged_control.git		# 克隆到本地

# Clone OCS2
git clone git@github.com:leggedrobotics/ocs2.git
# Clone pinocchio
git clone --recurse-submodules https://github.com/leggedrobotics/pinocchio.git
# Clone hpp-fcl
git clone --recurse-submodules https://github.com/leggedrobotics/hpp-fcl.git
# Clone ocs2_robotic_assets
git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git
# Install dependencies
sudo apt install liburdfdom-dev liboctomap-dev libassimp-dev

回到项目路径(src上一级目录)

复制代码
catkin config -DCMAKE_BUILD_TYPE=RelWithDebInfo
catkin build ocs2_legged_robot_ros ocs2_self_collision_visualization

catkin build legged_gazebo

实物机器人采用下面这个(hw = hardware)

复制代码
catkin build legged_unitree_hw

echo "source ~/leg/devel/setup.bash" >> ~/.bashrc		# 添加到环境变量
source  ~/.bashrc

roslaunch ocs2_legged_robot_ros legged_robot_ddp.launch		# 启动一个例子

仿真界面操作

复制代码
export ROBOT_TYPE=a1		# 设置仿真机器人类型

roslaunch legged_unitree_description empty_world.launch		# 启动仿真空世界

# 加载控制器
# cheater = true 即初始化`legged_cheater_controller`
 roslaunch legged_controllers load_controller.launch cheater:=false

# 安装相关工具
sudo apt install ros-noetic-rqt-controller-manager
rqt			# 打开rqt工具

找到选项 Plugins-->Topics-->Message Publisher,然后打开/cmd_vel话题,这样机器人就站起来了

找到选项 Plugins-->Robot Tools-->Controller manager, 右键启动两个控制器,变成绿色。

找到选项 Plugins-->Robot Tools-->Robot Steering , 打开了速度控制条

接着导航栏这边主要修改成这样,odom,添加机器人模型add --> RobotModel,修改legged_robot_description。要显示足端轨迹就找到MarkerArray,打开相应的话题。

在输入了 roslaunch legged_controllers load_controller.launch cheater:=false,这个终端可以输入相应步态来控制机器人行走,比如trot走路,然后就可以用键盘控制运动了。

相关推荐
lht6319356128 小时前
Ubuntu Server系统安装谷歌浏览器
linux·运维·ubuntu
知南x8 小时前
【QT界面设计学习篇】qt Kits工具设置/qt多版本设置(ubuntu)
qt·学习·ubuntu
BB_CC_DD8 小时前
在NVIDIA Jetson Orin NX (Ubuntu 22.04, JetPack 5.1, CUDA 11 cuDnn8) 上安装PyTorch 2
pytorch·深度学习·ubuntu
hkNaruto8 小时前
【DevOps】基于Nexus部署内网ubuntu 2204系统APT代理镜像仓库操作手册
运维·ubuntu·devops
残影飞雪8 小时前
jetson orin nano 部署FastDeploy
ubuntu
Better Bench21 小时前
ubuntu20.04安全的安装可穿墙的远程软件parsec
安全·ubuntu·远程·parsec
新手村领路人1 天前
Ubuntu18.04 libc.so.6: version `GLIBC_2.28‘ not found问题
linux·ubuntu·pycharm
ARM+FPGA+AI工业主板定制专家1 天前
【JETSON+FPGA+GMSL】实测分享 | 如何实现激光雷达与摄像头高精度时间同步?
人工智能·数码相机·机器学习·fpga开发·机器人·自动驾驶
武子康1 天前
AI-调查研究-105-具身智能 机器人学习数据采集:从示范视频到状态-动作对的流程解析
人工智能·深度学习·机器学习·ai·系统架构·机器人·具身智能
ARM+FPGA+AI工业主板定制专家1 天前
Jetson AGX Orin+GMSL+AI视觉开发套件,支持自动驾驶,机器人,工业视觉等应用
人工智能·机器学习·fpga开发·机器人·自动驾驶