机器人操作系统二(ROS2)- 启程 Departure

星夢妙者
发布: 2025-09-14 09:08:01
原创
970人浏览过

版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (creative commons)

是时候放下ROS1,开启ROS2的旅程了。It's time to put down ROS1 and start the journey of ROS2.

ROS2官方在线文档链接 ROS2 official online documentation:https://index.ros.org/doc/ros2/

ROS2教程文档使用说明与为什么选择ROS2?ROS2 tutorial documentation instructions and why choose ROS2?https://cloud.tencent.com/developer/article/1453644

ROS2常规学习路径 ROS2 regular learning path:

机器人操作系统二(ROS2)- 启程 Departure

demos、navigation2 and moveit2

ROS2进阶学习路径 ROS2 advanced learning path:

机器人操作系统二(ROS2)- 启程 Departure

others


学习分享从安装配置开始,首先详细介绍教程,然后是两个专题:Navigation2和MoveIt!2。This article starts with ROS2 installation and configuration, first introduces the tutorial in detail, then two topics: Navigation2 and MoveIt!2.

安装详细过程 Installation detailed tutorial:ROS 2 Dashing Diademata安装和使用文档(含Linux、Windows和OS X)ROS 2 Dashing Diademata installation and documentation (including Linux, Windows and OS X)

ROS教程 ROS 2 tutorials:https://github.com/zhangrelay/ros2_tutorials

配置教程包 Tutorial package configuration:

下载:git clone编译:colcon build使用:ros2 run
机器人操作系统二(ROS2)- 启程 Departure

colcon build

导入编译的环境 Import the compiled environment:

Giiso写作机器人
Giiso写作机器人

Giiso写作机器人,让写作更简单

Giiso写作机器人 56
查看详情 Giiso写作机器人

source install/setup.bash

输入ros2 run turtlesim,可以看到如下节点 Enter ros2 run turtlesim, you can see the following nodes:

draw_square --prefix turtle_teleop_key

mimic turtlesim_node

常用命令如下 Common commands are as follows:

ros2 run turtlesim turtlesim_noderos2 topic listros2 run turtlesim draw_squareros2 topic echo /turtle1/pose……

更多内容参考下图 For more details, please refer to the following figure:

机器人操作系统二(ROS2)- 启程 Departure

欢迎大家下载案例调试玩耍, 更多内容后续介绍。You are welcome to download the case, debug and play, more will be introduced in subsequent articles.

思考题 Thinking:

回顾roslaunch, 写一个ros2 launch,同时启动turtlesim_node和draw_spuare。Looking back at roslaunch, write a ros2 launch and start both the turtlesim_node and draw_spuare node.

扩展题 Extended:

对比ROS1和ROS2的turtlesim包,分析和思考两代ROS编程和使用中的差异。Compare the turbulsim package of ROS1 and ROS2, analyze and think about the difference between the two generations of ROS in programming and use.


draw_square.launch.py

代码语言:javascript代码运行次数:0运行复制
<pre class="brush:php;toolbar:false;">from launch import LaunchDescriptionimport launch_ros.actionsdef generate_launch_description():    return LaunchDescription([        launch_ros.actions.Node(            node_namespace= "ros2", package='turtlesim', node_executable='turtlesim_node', output='screen'),        launch_ros.actions.Node(            node_namespace= "ros2", package='turtlesim', node_executable='draw_square', output='screen'),    ])
登录后复制
机器人操作系统二(ROS2)- 启程 Departure
机器人操作系统二(ROS2)- 启程 Departure

以上就是机器人操作系统二(ROS2)- 启程 Departure的详细内容,更多请关注php中文网其它相关文章!

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门推荐
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号