ROS2机器人f1tenth之CLI工具基础
案例适用于ROS2如下三个版本:
- humble
- galactic
- foxy
适用于win/linux/macos。
为何选择f1tenth,延续性,之前使用f1tenth的ros1进行案例讲解。
具体可以参考如下链接:
蓝桥ROS之f1tenth简单PID沿墙跑起来(Python)
ROS2基础教程可以参考:
ROS2机器人个人教程博客汇总(2021共6套)
课程教程迭代更新只有进行时,没有完成时。
f1tenth资源需求量非常小,适合课程教学,并无缝支持云端实践,以此为主。
善于使用各类帮助文档,例如:
ros2 -h
命令会列出所有ros2的CLI命令:
zhangrelay@LAPTOP-5REQ7K1L:~$ ros2 -h
usage: ros2 [-h] [--use-python-default-buffering] Call `ros2 <command> -h` for more detailed usage. ...ros2 is an extensible command-line tool for ROS 2.options:-h, --help show this help message and exit--use-python-default-bufferingDo not force line buffering in stdout and instead use the python default buffering, whichmight be affected by PYTHONUNBUFFERED/-u and depends on whatever stdout is interactive or notCommands:action Various action related sub-commandsbag Various rosbag related sub-commandscomponent Various component related sub-commandsdaemon Various daemon related sub-commandsdoctor Check ROS setup and other potential issuesinterface Show information about ROS interfaceslaunch Run a launch filelifecycle Various lifecycle related sub-commandsmulticast Various multicast related sub-commandsnode Various node related sub-commandsparam Various param related sub-commandspkg Various package related sub-commandsrun Run a package specific executablesecurity Various security related sub-commandsservice Various service related sub-commandstopic Various topic related sub-commandswtf Use `wtf` as alias to `doctor`Call `ros2 <command> -h` for more detailed usage.
默认系统环境导入:
source /opt/ros/humble/setup.bash
自定义功能包环境导入,在对应文件夹下:
~/ros_ws/f1tenth_gym_ros$ source install/setup.sh
查看系统变量:
printenv | grep -i ROS
使用F1tenth和rqt:
~/ros_ws/f1tenth_gym_ros$ ros2 launch f1tenth_gym_ros gym_bridge_launch.py
试一试如下命令:
- ros2 node list
- ros2 topic list
- ros2 service list
- ros2 action list
zhangrelay@LAPTOP-5REQ7K1L:~$ ros2 topic list
/bond
/clicked_point
/clock
/cmd_vel
/diagnostics
/drive
/ego_racecar/odom
/ego_robot_description
/goal_pose
/initialpose
/joint_states
/map
/map_server/transition_event
/map_updates
/parameter_events
/rosout
/scan
/tf
/tf_static
zhangrelay@LAPTOP-5REQ7K1L:~$ ros2 service list
/bridge/describe_parameters
/bridge/get_parameter_types
/bridge/get_parameters
/bridge/list_parameters
/bridge/set_parameters
/bridge/set_parameters_atomically
/ego_robot_state_publisher/describe_parameters
/ego_robot_state_publisher/get_parameter_types
/ego_robot_state_publisher/get_parameters
/ego_robot_state_publisher/list_parameters
/ego_robot_state_publisher/set_parameters
/ego_robot_state_publisher/set_parameters_atomically
/lifecycle_manager_localization/describe_parameters
/lifecycle_manager_localization/get_parameter_types
/lifecycle_manager_localization/get_parameters
/lifecycle_manager_localization/is_active
/lifecycle_manager_localization/list_parameters
/lifecycle_manager_localization/manage_nodes
/lifecycle_manager_localization/set_parameters
/lifecycle_manager_localization/set_parameters_atomically
/map_server/change_state
/map_server/describe_parameters
/map_server/get_available_states
/map_server/get_available_transitions
/map_server/get_parameter_types
/map_server/get_parameters
/map_server/get_state
/map_server/get_transition_graph
/map_server/list_parameters
/map_server/load_map
/map_server/map
/map_server/set_parameters
/map_server/set_parameters_atomically
/rviz/describe_parameters
/rviz/get_parameter_types
/rviz/get_parameters
/rviz/list_parameters
/rviz/set_parameters
/rviz/set_parameters_atomically
zhangrelay@LAPTOP-5REQ7K1L:~$ ros2 node list
/bridge
/ego_robot_state_publisher
/lifecycle_manager_localization
/map_server
/rviz
/transform_listener_impl_55c114fc5430
zhangrelay@LAPTOP-5REQ7K1L:~$ ros2 action list
rqt 或 rqt --force-discover
rqt --help
usage: main.py [-b BINDING] [--clear-config] [-f] [--force-discover] [-h] [-ht] [-l] [-p PERSPECTIVE]
[--perspective-file PERSPECTIVE_FILE] [--reload-import] [-s PLUGIN] [-t] [-v]
[--args [PLUGIN_ARGS ...]] [--list-perspectives] [--list-plugins] [--command-pid PID]
[--command-start-plugin PLUGIN] [--command-switch-perspective PERSPECTIVE]Options for GUI instance:
-b BINDING, --qt-binding BINDING
choose Qt bindings to be used [pyqt|pyside]
--clear-config clear the configuration (including all perspectives and plugin settings)
-f, --freeze-layout freeze the layout of the GUI (prevent rearranging widgets, disable undock/redock)
--force-discover force a rediscover of plugins
-h, --help show this help message and exit
-ht, --hide-title hide the title label, the icon, and the help button (combine with -l and -f to eliminate the
entire title bar and reclaim the space)
-l, --lock-perspective
lock the GUI to the used perspective (hide menu bar and close buttons of plugins)
-p PERSPECTIVE, --perspective PERSPECTIVE
start with this named perspective
--perspective-file PERSPECTIVE_FILE
start with a perspective loaded from a file
--reload-import reload every imported module
-s PLUGIN, --standalone PLUGIN
start only this plugin (implies -l). To pass arguments to the plugin use --args
-t, --on-top set window mode to always on top
-v, --verbose output qDebug messages
--args [PLUGIN_ARGS ...]
arbitrary arguments which are passes to the plugin (only with -s, --command-start-plugin or
--embed-plugin). It must be the last option since it collects all following options.Options to query information without starting a GUI instance:
These options can be used to query information about valid arguments for various options.--list-perspectives list available perspectives
--list-plugins list available pluginsOptions to operate on a running GUI instance:
These options can be used to perform actions on a running GUI instance.--command-pid PID pid of the GUI instance to operate on, defaults to oldest running GUI instance
--command-start-plugin PLUGIN
start plugin
--command-switch-perspective PERSPECTIVE
switch perspectiveSpecial options for embedding widgets from separate processes:
These options should never be used on the CLI but only from the GUI code itself.
---
ROS2机器人f1tenth之CLI工具基础相关推荐
- ROS/ROS2机器人命令(cli)和基础编程(rclpy)的高效学习方法
啰啰嗦嗦讲满整整51分钟的直播回放如下: ROS2官方教程14 (dingtalk.com)https://h5.dingtalk.com/group-live-share/index.htm?enc ...
- ROS2机器人个人教程博客汇总(2021共6套)
从Dashing开始正式开课,到现在用Foxy进行教学.博客零散,现在汇总一下,今后不再以ROS2为主进行博客更新(适用于应用型本科的课程建设理论和实践部分已经全部完成)改为具体应用领域为主(服务机器 ...
- 【ROS2机器人入门到实战】
ROS2机器人入门到实战教程(鱼香ROS) 写在前面 当前平台文章汇总地址:ROS2机器人从入门到实战 获取完整教程及配套资料代码,请关注公众号<鱼香ROS>获取 教程配套机器人开发平台: ...
- 肝!22款超好用的CLI工具
作者 | switowski 策划 | 万佳 作者根据多年的终端使用经验,详细介绍了一些实用的 CLI 工具,希望它们能帮读者提高生产力. 前段时间,我写过一篇我最喜欢的 Mac 应用的文章.其实,我 ...
- 推荐的这22个高频 CLI 工具,确定不收藏吗?
程序员在从事开发的时候,使用终端CLI工具是必不可少的,终端CLI工具往往是生产力工具,为大家推荐一些有用的终端工具,建议清单如下. 请点击输入图片描述(最多18字) 高频 CLI 工具推荐 1.fi ...
- ROS2机器人编程简述humble-第一章-Introduction
ROS2机器人编程简述新书推荐-A Concise Introduction to Robot Programming with ROS2 学习笔记流水账-推荐阅读原书. 第一章:简要介绍宏观概念,配 ...
- 使用ROS2机器人操作系统进行多机器人编程技术实践(Multi-Robot Programming Via ROS2 )
简介 ROS2机器人操作系统简介2021英文字幕版本 使用机器人操作系统ROS2和机器人中间件框架系统RMF进行多机器人系统集成,高层规划及其应用等. 上图所示机器人按规划路径进行物流运输或场地巡逻任 ...
- ROS2机器人编程简述新书推荐-A Concise Introduction to Robot Programming with ROS2
参考链接: https://github.com/fmrico/book_ros2 封面: 简介: ROS2机器人编程简明教程 使用ROS2进行机器人编程的简明介绍为读者提供了通过编程实现机器人所需的 ...
- ROS2机器人应用简明教程01文档
学习ROS2机器人操作系统第一步要做什么呢?下载最新的官方文档到本地: 在github搜索ros2_documentation,使用git或者浏览器下载均可. 使用说明: 下载的文档需要编译才可使用, ...
最新文章
- 天道酬勤,付出总有回报。
- PyQt5 笔记3 -- 信号与槽
- 微信小程序:一个json帮你完成分享朋友圈图片
- 修改Cmder命令提示符
- 架构师必须知道的架构设计原则
- 洛谷 P1875 佳佳的魔法药水
- 2019美赛A题—学习记录
- [ECCV2020]Beyond 3DMM Space: Towards Fine-grained 3D Face Reconstruction
- Mac电脑上最好的3个txt阅读器
- 非IE内核浏览器支持Active X控件
- java中实现正态分布
- 任何矩阵都能变换成梯形阵的证明
- 【AI Data Science】第 1 章分析性思维与 人工智能驱动的企业
- Java 埃拉托色尼筛选法
- English trip V2-B 4 My Uncle Sam and Apple Pie 山姆大叔和苹果派 Teacher:Tom
- CSS设置背景图宽度100%,高度自适应
- K近邻算法 模拟sklearn调用 自定义优化Knn算法模型 ---完整代码
- 极链科技联合阿里云发布视联网平台解决方案
- 读刘未鹏老大《你应当如何学习C++(以及编程)》
- 容联领衔“科技金融50人”思辨 开启未来金融新征程