【ros2 control 机器人驱动开发】双关节多控制器机器人学习-example 3

前言

本篇文章在上篇文章的基础上主要讲解多个控制器interface的双轴机器人驱动怎么编写配置,同时方便大家理解下边几种controller:

  • position_controllers: hardware_interface::HW_IF_POSITION
  • velocity_controller: hardware_interface::HW_IF_VELOCITY
  • acceleration_controllers: hardware_interface::HW_IF_ACCELERATION
  • effort_controllers: hardware_interface::HW_IF_EFFORT

分别是位置、速度、加速度、扭矩控制。

一、创建controller相关

cd ~/ros2_control_demos

ros2 pkg create --build-type ament_cmake ros2_control_demo_example_3

# 文件结构
$ tree ros2_control_demo_example_3
ros2_control_demo_example_3
├── CMakeLists.txt
├── bringup
│   ├── config
│   │   └── rrbot_multi_interface_forward_controllers.yaml
│   └── launch
│       └── rrbot_system_multi_interface.launch.py
├── description
│   ├── launch
│   │   └── view_robot.launch.py
│   ├── ros2_control
│   │   └── rrbot_system_multi_interface.ros2_control.xacro
│   └── urdf
│       └── rrbot_system_multi_interface.urdf.xacro
├── hardware
│   ├── include
│   │   └── ros2_control_demo_example_3
│   │       ├── rrbot_system_multi_interface.hpp
│   │       └── visibility_control.h
│   └── rrbot_system_multi_interface.cpp
├── package.xml
└── ros2_control_demo_example_3.xml

10 directories, 11 files
# packages.xml

<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
  <name>ros2_control_demo_example_3</name>
  <version>0.0.0</version>
  <description>TODO: Package description</description>
  
03-05 11:30