ROS2学习日志:TurtleSim测试日志(基于ROS2 Eloquent Elusor)
TurtleSim测试日志(基于ROS2 Eloquent Elusor)
1.ros2 run
1.1 ros2 run turtlesim turtlesim_node --ros-args --remap __node:=robotMan
1.2 ros2 run turtlesim turtle_teleop_key --ros-args --remap __node:=robotRC
2.ros2 node
2.1 ros2 node list
/robotMan /robotRC |
2. 2 ros2 node info /robotMan
/robotMan Subscribers: /parameter_events: rcl_interfaces/msg/ParameterEvent /turtle1/cmd_vel: geometry_msgs/msg/Twist Publishers: /parameter_events: rcl_interfaces/msg/ParameterEvent /rosout: rcl_interfaces/msg/Log /turtle1/color_sensor: turtlesim/msg/Color /turtle1/pose: turtlesim/msg/Pose Service Servers: /clear: std_srvs/srv/Empty /kill: turtlesim/srv/Kill /reset: std_srvs/srv/Empty /robotMan/describe_parameters: rcl_interfaces/srv/DescribeParameters /robotMan/get_parameter_types: rcl_interfaces/srv/GetParameterTypes /robotMan/get_parameters: rcl_interfaces/srv/GetParameters /robotMan/list_parameters: rcl_interfaces/srv/ListParameters /robotMan/set_parameters: rcl_interfaces/srv/SetParameters /robotMan/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically /spawn: turtlesim/srv/Spawn /turtle1/set_pen: turtlesim/srv/SetPen /turtle1/teleport_absolute: turtlesim/srv/TeleportAbsolute /turtle1/teleport_relative: turtlesim/srv/TeleportRelative Service Clients: Action Servers: /turtle1/rotate_absolute: turtlesim/action/RotateAbsolute Action Clients: |
3.ros2 topic
3.1 ros2 topic list -t
/parameter_events [rcl_interfaces/msg/ParameterEvent] /rosout [rcl_interfaces/msg/Log] /turtle1/cmd_vel [geometry_msgs/msg/Twist] /turtle1/color_sensor [turtlesim/msg/Color] /turtle1/pose [turtlesim/msg/Pose] |
3.2 ros2 topic type /turtle1/cmd_vel
geometry_msgs/msg/Twist |
ros2 interface show geometry_msgs/msg/Twist # This expresses velocity in free space broken into its linear and angular parts. Vector3 linear Vector3 angular |
3.3 ros2 topic info /turtle1/cmd_vel
Type: geometry_msgs/msg/Twist Publisher count: 1 Subscriber count: 1 |
3. 4 ros2 topic hz /turtle1/cmd_vel
average rate: 0.406 min: 0.001s max: 4.923s std dev: 2.46103s window: 2 average rate: 1.329 min: 0.000s max: 4.923s std dev: 1.58888s window: 8 |
3. 5 ros2 topic bw /turtle1/cmd_vel
Subscribed to [/turtle1/cmd_vel] average: 218.03B/s mean: 52.00B/s min: 52.00B/s max: 52.00B/s window: 2 average: 140.26B/s mean: 52.00B/s min: 52.00B/s max: 52.00B/s window: 4 |
3.6 ros2 topic delay /turtle1/cmd_vel
msg does not have header |
3.7 ros2 topic echo /turtle1/cmd_vel
linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: -2.0 --- linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: -2.0 |
3.8 ros2 topic pub --once /turtle1/cmd_vel geometry_msgs/msg/Twist “{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}”
publisher: beginning loop publishing #1: geometry_msgs.msg.Twist(linear=geometry_msgs.msg.Vector3(x=2.0, y=0.0, z=0.0), angular=geometry_msgs.msg.Vector3(x=0.0, y=0.0, z=1.8)) |
ros2 topic pub --rate 1 /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}" publisher: beginning loopss publishing #1: geometry_msgs.msg.Twist(linear=geometry_msgs.msg.Vector3(x=2.0, y=0.0, z=0.0), angular=geometry_msgs.msg.Vector3(x=0.0, y=0.0, z=1.8)) publishing #2: geometry_msgs.msg.Twist(linear=geometry_msgs.msg.Vector3(x=2.0, y=0.0, z=0.0), angular=geometry_msgs.msg.Vector3(x=0.0, y=0.0, z=1.8)) publishing #3: geometry_msgs.msg.Twist(linear=geometry_msgs.msg.Vector3(x=2.0, y=0.0, z=0.0), angular=geometry_msgs.msg.Vector3(x=0.0, y=0.0, z=1.8)) |
3.9 ros2 topic find geometry_msgs/msg/Twist
/turtle1/cmd_vel |
4.ros2 service
4.1 ros2 service list -t
/clear [std_srvs/srv/Empty] /kill [turtlesim/srv/Kill] /reset [std_srvs/srv/Empty] /robotMan/describe_parameters [rcl_interfaces/srv/DescribeParameters] /robotMan/get_parameter_types [rcl_interfaces/srv/GetParameterTypes] /robotMan/get_parameters [rcl_interfaces/srv/GetParameters] /robotMan/list_parameters [rcl_interfaces/srv/ListParameters] /robotMan/set_parameters [rcl_interfaces/srv/SetParameters] /robotMan/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically] /robotRC/describe_parameters [rcl_interfaces/srv/DescribeParameters] /robotRC/get_parameter_types [rcl_interfaces/srv/GetParameterTypes] /robotRC/get_parameters [rcl_interfaces/srv/GetParameters] /robotRC/list_parameters [rcl_interfaces/srv/ListParameters] /robotRC/set_parameters [rcl_interfaces/srv/SetParameters] /robotRC/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically] /spawn [turtlesim/srv/Spawn] /turtle1/set_pen [turtlesim/srv/SetPen] /turtle1/teleport_absolute [turtlesim/srv/TeleportAbsolute] /turtle1/teleport_relative [turtlesim/srv/TeleportRelative] |
4.2 ros2 service type /spawn /kill
turtlesim/srv/Spawn turtlesim/srv/Kill |
ros2 interface show turtlesim/srv/Spawn turtlesim/srv/Kill float32 x string name float32 y --- float32 theta string name # Optional. A unique name will be created and returned if this is empty --- string name |
4.3 ros2 service call /spawn turtlesim/srv/Spawn "{x: 2, y: 2, theta: 0.2, name: 'turtleXYZ'}"
waiting for service to become available... requester: making request: turtlesim.srv.Spawn_Request(x=2.0, y=2.0, theta=0.2, name='turtleXYZ') response: turtlesim.srv.Spawn_Response(name='turtleXYZ') |
||
ros2 node list /robotMan /robotRC |
ros2 topic list /parameter_events /rosout /turtle1/cmd_vel /turtle1/color_sensor /turtle1/pose /turtleXYZ/cmd_vel /turtleXYZ/color_sensor /turtleXYZ/pose |
ros2 service list /clear /kill /reset /robotMan/describe_parameters /robotMan/get_parameter_types /robotMan/get_parameters /robotMan/list_parameters /robotMan/set_parameters /robotMan/set_parameters_atomically /robotRC/describe_parameters /robotRC/get_parameter_types /robotRC/get_parameters /robotRC/list_parameters /robotRC/set_parameters /robotRC/set_parameters_atomically /spawn /turtle1/set_pen /turtle1/teleport_absolute /turtle1/teleport_relative /turtleXYZ/set_pen /turtleXYZ/teleport_absolute /turtleXYZ/teleport_relative |
ros2 service call /kill turtlesim/srv/Kill "{name: 'turtleXYZ'}" waiting for service to become available... requester: making request: turtlesim.srv.Kill_Request(name='turtleXYZ') response: turtlesim.srv.Kill_Response() |
4.4 ros2 service find turtlesim/srv/Spawn turtlesim/srv/Kill
/spawn /kill |
5.ros2 action
5.1 ros2 action list -t
/turtle1/rotate_absolute [turtlesim/action/RotateAbsolute] |
5.2 ros2 action info /turtle1/rotate_absolute
Action: /turtle1/rotate_absolute Action clients: 1 /robotRC Action servers: 1 /robotMan |
5.3 ros2 action show turtlesim/action/RotateAbsolute
# The desired heading in radians float32 theta --- # The angular displacement in radians to the starting position float32 delta --- # The remaining rotation in radians float32 remaining |
ros2 interface show turtlesim/action/RotateAbsolute # The desired heading in radians float32 theta --- # The angular displacement in radians to the starting position float32 delta --- # The remaining rotation in radians float32 remaining |
5.4 ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 1.57}"
Waiting for an action server to become available... Sending goal: theta: 1.57 Goal accepted with ID: 0f0afda3857f4c7393360e211f6701f9 Result: delta: -1.5520002841949463 Goal finished with status: SUCCEEDED |
6.ros2 param
6.1 ros2 param list
/robotMan: background_b background_g background_r use_sim_time /robotRC: scale_angular scale_linear use_sim_time |
6.2 ros2 param get /robotMan background_r
Integer value is: 69 |
6.3 ros2 param set /robotMan background_r 255
Set parameter successful ros2 param dump /robotMan Saving to: .\robotMan.yaml |
robotMan: ros__parameters: background_b: 255 background_g: 86 background_r: 255 use_sim_time: false |
6.4 ros2 param delete /robotMan background_r
Deleted parameter successfully |
ros2 param list /robotMan: background_b background_g use_sim_time /robotRC: scale_angular scale_linear use_sim_time |
6.5 ros2 param describe /robotMan /background_r
Parameter name: background_r Type: integer Description: Red channel of the background color Constraints: Min value: 0 Max value: 255 |
6.6 ros2 param dump /robotMan
Saving to: .\robotMan.yaml |
7.ros2 launch
7.1 ros2 launch turtlesim_mimic_launch.py
[INFO] [launch]: All log files can be found below C:\Users\Administrator\.ros/log\2020-01-02-20-17-03-535917-Win10PC-9152 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [turtlesim_node.EXE-1]: process started with pid [3832] [INFO] [turtlesim_node.EXE-2]: process started with pid [10064] [INFO] [mimic.EXE-3]: process started with pid [8304] |
|
from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='turtlesim', node_executable='turtlesim_node', node_name='robotMan', node_namespace='namespaceABC', ), Node( package='turtlesim', node_executable='turtlesim_node', node_name='robotMan', node_namespace='namespaceXYZ' ), Node( package='turtlesim', node_executable='mimic', node_name='mimic', remappings=[ ('/input/pose', '/namespaceABC/turtle1/pose'), ('/output/cmd_vel', '/namespaceXYZ/turtle1/cmd_vel'), ] ) ]) |
|
ros2 topic pub -r 1 /namespaceABC/turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: -1.8}}" |
|
ros2 node list /launch_ros /mimic /namespaceABC/robotMan /namespaceXYZ/robotMan ros2 topic list /namespaceABC/parameter_events /namespaceABC/robotMan/pose /namespaceABC/rosout /namespaceABC/turtle1/cmd_vel /namespaceABC/turtle1/color_sensor /namespaceABC/turtle1/pose /namespaceXYZ/parameter_events /namespaceXYZ/robotMan/cmd_vel /namespaceXYZ/rosout /namespaceXYZ/turtle1/cmd_vel /namespaceXYZ/turtle1/color_sensor /namespaceXYZ/turtle1/pose /parameter_events /rosout ros2 action list /namespaceABC/turtle1/rotate_absolute /namespaceXYZ/turtle1/rotate_absolute ros2 param list /launch_ros: use_sim_time /mimic: use_sim_time /namespaceABC/robotMan: background_b background_g background_r use_sim_time /namespaceXYZ/robotMan: background_b background_g background_r use_sim_time |
ros2 service list /launch_ros/describe_parameters /launch_ros/get_parameter_types /launch_ros/get_parameters /launch_ros/list_parameters /launch_ros/set_parameters /launch_ros/set_parameters_atomically /mimic/describe_parameters /mimic/get_parameter_types /mimic/get_parameters /mimic/list_parameters /mimic/set_parameters /mimic/set_parameters_atomically /namespaceABC/clear /namespaceABC/kill /namespaceABC/reset /namespaceABC/robotMan/describe_parameters /namespaceABC/robotMan/get_parameter_types /namespaceABC/robotMan/get_parameters /namespaceABC/robotMan/list_parameters /namespaceABC/robotMan/set_parameters /namespaceABC/robotMan/set_parameters_atomically /namespaceABC/spawn /namespaceABC/turtle1/set_pen /namespaceABC/turtle1/teleport_absolute /namespaceABC/turtle1/teleport_relative /namespaceXYZ/clear /namespaceXYZ/kill /namespaceXYZ/reset /namespaceXYZ/robotMan/describe_parameters /namespaceXYZ/robotMan/get_parameter_types /namespaceXYZ/robotMan/get_parameters /namespaceXYZ/robotMan/list_parameters /namespaceXYZ/robotMan/set_parameters /namespaceXYZ/robotMan/set_parameters_atomically /namespaceXYZ/spawn /namespaceXYZ/turtle1/set_pen /namespaceXYZ/turtle1/teleport_absolute /namespaceXYZ/turtle1/teleport_relative |
ROS2学习日志:TurtleSim测试日志(基于ROS2 Eloquent Elusor)的更多相关文章
- ROS2学习日志:QoS学习日志
QoS学习日志 参考:ROS2API 及 https://index.ros.org/doc/ros2/Concepts/About-Quality-of-Service-Settings 1.概述 ...
- ROS2学习之旅(4)——理解ROS2 Graph中的节点
ROS(2)图(ROS(2) graph)是一个同时处理数据的基于ROS2元素的网络,它包含了所有的可执行文件以及它们之间的连接.图中的基本元素包括:节点(nodes).话题(topics).服务(s ...
- ROS2学习之旅(1)——初识ROS2
本系列用来记录ROS2的学习过程,有错误或者不合理的地方请大家指正.由于博主具有ROS1的学习经历,会添加一些与ROS1的一些对比,当然这对于ROS2本身的学习内容没有丝毫影响,欢迎大家积极与我在评论 ...
- 基于Flask框架搭建视频网站的学习日志(一)
------------恢复内容开始------------ 基于Flask框架搭建视频网站的学习日志(一)2020/02/01 一.Flask环境搭建 创建虚拟环境 初次搭建虚拟环境 搭建完虚拟环境 ...
- 基于Flask框架搭建视频网站的学习日志(二)
基于Flask框架搭建视频网站的学习日志(二)2020/02/02 一.初始化 所有的Flask程序都必须创建一个程序实例,程序实例是Flask类的对象 from flask import Flask ...
- 基于Flask框架搭建视频网站的学习日志(三)之原始web表单
基于Flask框架搭建视频网站的学习日志(三)1.原始Web 表单 本节主要用于体验一下前端后端直接数据的交互,样例不是太完善,下一节会加入Flash处理,稍微完善一下页面 (备注:建议先阅读廖雪峰老 ...
- 基于ros2 dashing的建图导航探索
基于ros2 dashing的建图导航探索 1. 环境准备 安装ros2 dashing, 参考链接: https://index.ros.org/doc/ros2/Installation/Dash ...
- webpack2学习日志
webpack说容易也容易,说难也难,主要还是看个人,想学到什么样的程度,很多公司可能要求仅仅是会用就行,但是也有一些公司要求比较高,要懂一些底层的原理,所以还是要花一些时间的,看个人需求.这篇仅仅是 ...
- Asp.Net Core 2.0 项目实战(9) 日志记录,基于Nlog或Microsoft.Extensions.Logging的实现及调用实例
本文目录 1. Net下日志记录 2. NLog的使用 2.1 添加nuget引用NLog.Web.AspNetCore 2.2 配置文件设置 2.3 依赖配置及调用 ...
随机推荐
- ADV-299 宰羊 (java,过了30%)
问题描述 炫炫回了内蒙,肯定要吃羊肉啦,所有他家要宰羊吃. 炫炫家有N只羊,羊圈排成一排,标号1~N.炫炫每天吃掉一只羊(这食量!其实是放生啦),吃掉的羊的邻居会以为它被放生了,然后又会告诉他们的邻居 ...
- robotframework+appium 实现App自动化值环境搭建(一)
第一步: Cmd命令输入pip install robotframework-appiumlibrary 下载和导入appiumlibrary 第二步: 安装JDK,附件有JDK1.8安装包 第三步 ...
- myeclipse汉化
MyEclipse默认安装在计算机用户目录下面,安装完成后对MyEclipse快捷方式使用鼠标右键属性---打开文件位置--进入安装的目录下面即可看到 zh_CN.7z解压缩将zh_CN目录文件放到 ...
- 学习笔记:中国剩余定理(CRT)
引入 常想起在空间里见过的一些智力题,这个题你见过吗: 一堆苹果,\(3\)个\(3\)个地取剩\(1\)个,\(5\)个\(5\)个地取剩\(1\)个,\(7\)个\(7\)个地取剩\(2\)个,苹 ...
- 072、Java面向对象之定义构造方法
01.代码如下: package TIANPAN; class Book { // 定义一个新的类 public Book() { // 构造方法 System.out.println("* ...
- 前端学习笔记系列一:7 在vscode中根据vue等模板生成代码
目标:希望每次新建.vue文件后,VSCODE能够根据配置,自动生成我们想要的内容. 方法:打开VSCODE编辑器,依次选择“文件 -> 首选项 -> 用户代码片段”,此时,会弹出一个搜索 ...
- 前端学习笔记系列一:2 Vue的单文件组件
(1)非单文件vue组件和单文件vue组件的一般写法 一个完整的vue组件会包括三个部分:一是template模板部分,二是js程序逻辑部分,三是css样式部分.每个组件都有属于自己的模板,js和样式 ...
- php面向对象的三大特性——封装、继承、多态
1.封装 目的:为了使类更加安全,类里面的成员变量对外界隐藏 做法: 1)将成员变量变成私有的: 2)在类中做方法间接访问成员变量: 3)在方法里面加控制条件. 例: class ren{ priva ...
- 复习hibernate
Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库. Hibernate可以应用在任何使用JDB ...
- 无需重新编译安装PHP扩展的方法
转自:https://www.jianshu.com/p/ae3c17b0f126 PHP扩展模块通常有两种: PHP官方扩展.如果php通过源码安装(php7),安装的时候未开启,而后来需要开启某个 ...