ROS2_Control官方资料+运动控制

Getting Started — ROS2_Control: Rolling Dec 2023 documentation

  • Getting Started
  •  Edit on GitHub

You're reading the documentation for a development version. For the latest released version, please have a look at Iron.

Getting Started

Installation

Binary packages

The ros2_control framework is released for ROS 2 rolling. To use it, you have to install ros-rolling-ros2-control and ros-rolling-ros2-controllers packages.

Building from Source

If you want to install the framework from source, e.g., for contributing to the framework, use the following commands:

  • Download all repositories

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws/
    wget https://raw.githubusercontent.com/ros-controls/control.ros.org/master/ros_controls.$ROS_DISTRO.repos
    vcs import src < ros_controls.$ROS_DISTRO.repos
    
  • Install dependencies:

    rosdep update --rosdistro=$ROS_DISTRO
    sudo apt-get update
    rosdep install --from-paths src --ignore-src -r -y
    
  • Build everything, e.g. with:

    . /opt/ros/${ROS_DISTRO}/setup.sh
    colcon build --symlink-install
    
  • Do not forget to source setup.bash from the install folder!

Architecture

The source code for the ros2_control framework can be found in the ros2_control and ros2_controllers GitHub repositories. The following figure shows the architecture of the ros2_control framework.

"ros2_control Architecture"

The following UML Class Diagram describes the internal implementation of the ros2_control framework.

"UML Class Diagram"

Controller Manager

The Controller Manager (CM) connects the controllers and hardware-abstraction sides of the ros2_control framework. It also serves as the entry-point for users via ROS services. The CM implements a node without an executor so that it can be integrated into a custom setup. However, it’s usually recommended to use the default node-setup implemented in ros2_control_node file from the controller_manager package. This manual assumes that you use this default node-setup.

On the one hand, CM manages (e.g. loads, activates, deactivates, unloads) controllers and the interfaces they require. On the other hand, it has access (via the Resource Manager) to the hardware components, i.e. their interfaces. The Controller Manager matches required and provided interfaces, granting controllers access to hardware when enabled, or reporting an error if there is an access conflict.

The execution of the control-loop is managed by the CM’s update() method. It reads data from the hardware components, updates outputs of all active controllers, and writes the result to the components.

Resource Manager

The Resource Manager (RM) abstracts physical hardware and its drivers (called hardware components) for the ros2_control framework. The RM loads the components using the pluginlib-library, manages their lifecycle and components’ state and command interfaces. The abstraction provided by RM allows reuse of implemented hardware components, e.g., robot and gripper, without any implementation, and flexible hardware application for state and command interfaces, e.g., separate hardware/communication libraries for motor control and encoder reading.

In the control loop execution, the RM’s read() and write() methods handle the communication with the hardware components.

Controllers

The controllers in the ros2_control framework are based on control theory. They compare the reference value with the measured output and, based on this error, calculate a system’s input. The controllers are objects derived from ControllerInterface (controller_interface package in ros2_control) and exported as plugins using pluginlib-library. For an example of a controller check the ForwardCommandController implementation in the ros2_controllers repository. The controller lifecycle is based on the LifecycleNode class, which implements the state machine described in the Node Lifecycle Design document.

When the control-loop is executed, the update() method is called. This method can access the latest hardware state and enable the controller to write to the hardware command interfaces.

User Interfaces

Users interact with the ros2_control framework using Controller Manager’s services. For a list of services and their definitions, check the srv folder in the controller_manager_msgs package.

While service calls can be used directly from the command line or via nodes, there exists a user-friendly Command Line Interface (CLI) which integrates with the ros2 cli. This supports auto-complete and has a range of common commands available. The base command is ros2 control. For the description of our CLI capabilities, see the Command Line Interface (CLI) documentation.

Hardware Components

The hardware components realize communication to physical hardware and represent its abstraction in the ros2_control framework. The components have to be exported as plugins using pluginlib-library. The Resource Manager dynamically loads those plugins and manages their lifecycle.

There are three basic types of components:

System

Complex (multi-DOF) robotic hardware like industrial robots. The main difference between the Actuator component is the possibility to use complex transmissions like needed for humanoid robot’s hands. This component has reading and writing capabilities. It is used when there is only one logical communication channel to the hardware (e.g., KUKA-RSI).

Sensor

Robotic hardware is used for sensing its environment. A sensor component is related to a joint (e.g., encoder) or a link (e.g., force-torque sensor). This component type has only reading capabilities.

Actuator

Simple (1 DOF) robotic hardware like motors, valves, and similar. An actuator implementation is related to only one joint. This component type has reading and writing capabilities. Reading is not mandatory if not possible (e.g., DC motor control with Arduino board). The actuator type can also be used with a multi-DOF robot if its hardware enables modular design, e.g., CAN-communication with each motor independently.

A detailed explanation of hardware components is given in the Hardware Access through Controllers design document.

Hardware Description in URDF

The ros2_control framework uses the <ros2_control>-tag in the robot’s URDF file to describe its components, i.e., the hardware setup. The chosen structure enables tracking together multiple xacro-macros into one without any changes. The example hereunder shows a position-controlled robot with 2-DOF (RRBot), an external 1-DOF force-torque sensor, and an externally controlled 1-DOF parallel gripper as its end-effector. For more examples and detailed explanations, check the ros2_control_demos site and ROS 2 Control Components URDF Examples design document.

<ros2_control name="RRBotSystemPositionOnly" type="system"><hardware><plugin>ros2_control_demo_hardware/RRBotSystemPositionOnlyHardware</plugin><param name="example_param_write_for_sec">2</param><param name="example_param_read_for_sec">2</param></hardware><joint name="joint1"><command_interface name="position"><param name="min">-1</param><param name="max">1</param></command_interface><state_interface name="position"/></joint><joint name="joint2"><command_interface name="position"><param name="min">-1</param><param name="max">1</param></command_interface><state_interface name="position"/></joint>
</ros2_control>
<ros2_control name="RRBotForceTorqueSensor1D" type="sensor"><hardware><plugin>ros2_control_demo_hardware/ForceTorqueSensor1DHardware</plugin><param name="example_param_read_for_sec">0.43</param></hardware><sensor name="tcp_fts_sensor"><state_interface name="force"/><param name="frame_id">rrbot_tcp</param><param name="min_force">-100</param><param name="max_force">100</param></sensor>
</ros2_control>
<ros2_control name="RRBotGripper" type="actuator"><hardware><plugin>ros2_control_demo_hardware/PositionActuatorHardware</plugin><param name="example_param_write_for_sec">1.23</param><param name="example_param_read_for_sec">3</param></hardware><joint name="gripper_joint "><command_interface name="position"><param name="min">0</param><param name="max">50</param></command_interface><state_interface name="position"/><state_interface name="velocity"/></joint>
</ros2_control>

Running the Framework for Your Robot

To run the ros2_control framework, do the following. The example files can be found in the ros2_control_demos repository.

  1. Create a YAML file with the configuration of the controller manager and two controllers. (Example configuration for RRBot)

  2. Extend the robot’s URDF description with needed <ros2_control> tags. It is recommended to use macro files (xacro) instead of pure URDF. (Example URDF for RRBot)

  3. Create a launch file to start the node with Controller Manager. You can use a default ros2_control node (recommended) or integrate the controller manager in your software stack. (Example launch file for RRBot)

NOTE: You could alternatively use a script to create setup a skeleton of the “hardware_interface” package by using the scripts provided by one of our maintainers.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/285762.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

三、教你搞懂渐变堆叠面积图《手把手教你 ECharts 数据可视化详解》

注&#xff1a;本系列教程需要对应 JavaScript 、html、css 基础&#xff0c;否则将会导致阅读时困难&#xff0c;本教程将会从 ECharts 的官方示例出发&#xff0c;详解每一个示例实现&#xff0c;从中学习 ECharts 。 ECharts 官方示例&#xff1a;https://echarts.apache.o…

试用了多款报表工具,终于找到了基于.Net 6开发的一个了

Part1前言上一个月有一个项目需要用到数据分析&#xff0c;将老板感兴趣的数据给他整理成一个面板&#xff0c;方便他实时查看&#xff0c;于是自己了解到了BI,当时我们项目就用了metabase&#xff0c;metabase是一款开源的BI分析工具&#xff0c;开发语言clojureReact为主。就…

4种CSS文字竖排方法

2019独角兽企业重金招聘Python工程师标准>>> 有时候&#xff0c;我们需要对网页某个区域的文字竖排&#xff0c;竖向排列&#xff0c;横向的当然大家都见惯了&#xff0c;对于竖排&#xff0c;一时间找不到思路了&#xff0c;呵呵&#xff0c;其实和横排一样简单&am…

【ArcGIS风暴】ArcGIS10.6创建LAS数据集的两种方法并加载点云数据

文章目录 1. 使用上下文菜单创建 LAS 数据集2. 使用地理处理工具创建 LAS 数据集3. 显示LAS数据集LAS 数据集是位于文件夹中的独立文件,并且引用 LAS 格式的激光雷达数据和用于定义表面特征的可选表面约束要素。可使用创建 LAS 数据集工具或 ArcCatalog 中文件夹的上下文菜单快…

关于建立北京市专业技术人员职业资格与职称对应关系的通知

原文地址 http://www.bjrbj.gov.cn/xxgk/gsgg/201906/t20190605_82857.html 附件 北京市专业技术人员职业资格与职称对应表 &#xff08;46项&#xff09; 一、准入类职业资格 序号 资格名称 可聘专业技术职务 1 注册消防工程师 一级注册消防工程师&#xff1a;工程师 二…

【Pix4d精品教程】Pix4d项目空三结果精度评估完整解决方案

《无人机航空摄影测量精品教程》合集目录(Pix4d、CC、EPS、PhotoScan、Inpho) 文章目录 一、单体项目评估二、整体项目评估在航测项目内业工作中,不管是垂直摄影,还是倾斜摄影,最核心的部分是空三加密,一个很重要的基础是共线方程。空三结果的精度是航测的基本要求,也会…

2016 10 26考试 NOIP模拟赛 杂题

Time 7&#xff1a;50 AM -> 11&#xff1a;15 AM 感觉今天考完后&#xff0c;我的内心是崩溃的 试题考试包 T1&#xff1a; 首先看起来是个贪心&#xff0c;然而&#xff0c;然而&#xff0c;看到那个100%数据为n < 2000整个人就虚了&#xff0c;发呆接近两小时后意识到…

[转]RxHttp 一条链发送请求,新一代Http请求神器(一)

简介 RxHttp是基于OkHttp的二次封装&#xff0c;并于RxJava做到无缝衔接&#xff0c;一条链就能发送一个完整的请求。主要功能如下&#xff1a; 支持Get、Post、Put、Delete等任意请求方式&#xff0c;可自定义请求方式支持Json、DOM等任意数据解析方式&#xff0c;可自定义数据…

【Pix4d精品教程】Pix4d空三后处理:点云分类与过滤、DSM精编生成DEM、生成等高线案例详解

《无人机航空摄影测量精品教程》合集目录(Pix4d、CC、EPS、PhotoScan、Inpho) DEM结果预览: 等高线结果预览: Pix4d内业空三结束后,会生成点云,DOM和DSM等产品,一般情况下,DOM精度不达标(如房屋边缘有噪点)的话,可以直接在镶嵌图编辑器进行DOM的编辑,然而后处理的…

git分支进阶

其实git除了版本控制&#xff0c;另外一个最突出的特点就是他的分支操作。简直 丝滑~.git也是多人协作的必备武器。 通常我们正常情况下只需要master 和 develop分支就够了。 这里我们先以这两条分支作为基准&#xff0c;进行一系列的操作。 开发新功能流程 这个应该属于develo…

关于c# .net爬虫

刚开始听到爬虫这两个字眼的时候感觉挺稀奇的&#xff0c;之前并没有接触过爬虫&#xff0c;正好这会手上没事&#xff0c;于是便百度了一下。 1.网络爬虫&#xff08;又被称为网页蜘蛛&#xff0c;网络机器人&#xff0c;在FOAF社区中间&#xff0c;更经常的称为网页追逐者&am…

【Pix4d精品教程】Pix4d中央子午线细化设置(测区跨两个分带)

《无人机航空摄影测量精品教程》合集目录(Pix4d、CC、EPS、PhotoScan、Inpho) 航测内业中,在自由空三结束之后,需要导入像控点,进而去刺像控点。但是当测区跨两个分带的时候(如测区正好处在3度带105和108中间),像控点可能距离靶标点很远,给刺点带来了很大难度。怎样解…

Failed:(13: Permission denied)导致访问浏览器出现Nginx 500 Internal Server Error

1 、问题 我在部署nginx反向代理服务器的时候&#xff0c;nginx.conf文件都配置好了&#xff0c;但是我在浏览器里面输入域名的时候&#xff0c;提示Nginx 500 Internal Server Error 2、分析 我们需要找到nginx输出错误日志的文件&#xff0c;在nginx.conf里面我们可以看到错…

MAUI与Blazor共享一套UI,媲美Flutter,实现Windows、macOS、Android、iOS、Web通用UI

1. 前言距离上次发《MAUI初体验&#xff1a;爽》一文已经过去2个月了&#xff0c;本计划是下半年或者明年再研究MAUI的&#xff0c;现在计划提前啦&#xff0c;因为我觉得MAUI Blazor挺有意思的&#xff1a;在Android、iOS、macOS、Windows之间共享UI&#xff0c;一处UI增加或者…

dns 报文格式

最近学习了下DNS的格式&#xff0c;发现很多内容都是转载自同一个而且说的不是很清楚&#xff0c;特再整理下具体可以查看RFC1035 http://www.ietf.org/rfc/rfc1035.txt有详细的解释对于英语理解不是很好和懒得看这么长的可以看下本文首先是DNS数据帧的格式-------------------…

【Pix4d精品教程】Pix4d修编正射影像DOM的两种方法案例详解

《无人机航空摄影测量精品教程》合集目录(Pix4d、CC、EPS、PhotoScan、Inpho) DOM修编前: DOM修编后: 文章摘要: Pix4d内业数据处理通常会生成点云、DSM和DOM等产品,DSM经过精编可以生成精准的DEM,而DOM一般情况下,存在比如房屋边缘被拉花,或者存在噪点的情况

终于找到了,开源的Vue3+.NET6通用管理后台!

据说80%的.NET项目都是管理后台&#xff0c;然而能用上Vue3.NET6的管理后台并不多见。这里分享一套Vue3 Axios TS Vite ElementUI Plus .NET 6 WebAPI JWT SqlSugar的前后端分离架构的通用管理后台源码数据库脚本&#xff0c;还有与之配套录制的一组视频教程&#xff0c;全部打…

【Pix4d精品教程】Pix4d模型成果导出OSGB并加载OSGB到EPS进行三维测图完美案例教程

《无人机航空摄影测量精品教程》合集目录(Pix4d、CC、EPS、PhotoScan、Inpho) 在垂直摄影中,Pix4d也可以生成漂亮的三维模型,并导出为OSGB,加载到EPS进行三维测图。首先来看生成的三维格网纹理和EPS三维模型加载效果。 Pix4d生成的三维格网纹理: EPS加载OSGB模型效果: 文…

Android实现ListView(1)

昨天有个朋友问我Android ListView列表视图&#xff0c;遇到了点错误&#xff0c;今天我给大家演示&#xff0c;具体实现见图&#xff1a; 1&#xff1a;创建一个item布局layout/item.xml 2&#xff1a;创建一个ListViewActivity类&#xff0c;但是必须继承ListActivity&#x…

WolframAlpha 的使用

WolframAlpha 1. 求解复杂方程组 ab−4abc2ac1直接点开网站&#xff0c;在输入框中输入&#xff0c;ab-4;abc2;ac1;&#xff08;逗号分割开来&#xff09;&#xff0c; 转载于:https://www.cnblogs.com/mtcnn/p/9423087.html