ROS2轻松学2-工具篇5-actions演示讲义(含视频)
ROS2轻松学2-工具篇5-actions演示讲义
说明:
- 介绍如何认识actions
参考:
示例:
- action帮助
ros2 action -h
- 启动turtlesim和键盘控制
ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key
- 按G|B|V|C|D|E|R|T 实现旋转,按F键盘取消
- 查看节点action的服务端和客户端
ros2 node info /turtlesim
- 查看动作列表
ros2 action list
ros2 action list -t #显示动作类型
- 查看动作信息
ros2 action info <action>
ros2 action info /turtle1/rotate_absolute
- 查看动作消息内容
ros2 interface show turtlesim/action/RotateAbsolute
- 发送动作目标信息
ros2 action send_goal <action_name> <action_type>
ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 1.57}"
#带反馈信息
ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 0}" --feedback
视频演示:
- 在线版本:
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号