turtlebot2机器人topic指令解析

输入指令:

roslaunch turtlebot_bringup minimal.launch

可以启动turtlebot2机器人底盘。

输入:

rostopic list

显示:

/cmd_vel_mux/active

当没有键盘手柄遥控时发送的消息为: data: “idle”

当使用键盘遥控时发送的消息为:data: “Teleoperation”

/cmd_vel_mux/input/navi

底盘线速度和角速度控制

    rostopic pub /cmd_vel_mux/input/navi geometry_msgs/Twis"linear:
      x: 0.2
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: 0.0"

/cmd_vel_mux/input/safety_controller

底盘速度控制,在运行过程中会监控bumper等

    rostopic pub /cmd_vel_mux/input/safety_controller geoy_msgs/Twist "linear:
      x: 0.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: -2.0"

/cmd_vel_mux/input/switch

底盘速度控制
利用机器人操作系统ros对机器人进行控制,自主导航navigation输出的速度由于加速度大,会造成小车震动,需要进行速度平滑。

rostopic pub /cmd_vel_mux/input/switch geometry_msgs/Twist "linear:
  x: 0.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 2.0"

/cmd_vel_mux/input/teleop

遥控小车的速度话题

/cmd_vel_mux/parameter_descriptions

groups: 
  - 
    name: "Default"
    type: ''
    parameters: 
      - 
        name: "yaml_cfg_file"
        type: "str"
        level: 0
        description: "Pathname to a yaml file for re-configuration of the mux"
        edit_method: ''
      - 
        name: "yaml_cfg_data"
        type: "str"
        level: 0
        description: "Yaml-formatted string for re-configuration of the mux"
        edit_method: ''
    parent: 0
    id: 0
max: 
  bools: []
  ints: []
  strs: 
    - 
      name: "yaml_cfg_file"
      value: ''
    - 
      name: "yaml_cfg_data"
      value: ''
  doubles: []
  groups: 
    - 
      name: "Default"
      state: True
      id: 0
      parent: 0
min: 
  bools: []
  ints: []
  strs: 
    - 
      name: "yaml_cfg_file"
      value: ''
    - 
      name: "yaml_cfg_data"
      value: ''
  doubles: []
  groups: 
    - 
      name: "Default"
      state: True
      id: 0
      parent: 0
dflt: 
  bools: []
  ints: []
  strs: 
    - 
      name: "yaml_cfg_file"
      value: ''
    - 
      name: "yaml_cfg_data"
      value: ''
  doubles: []
  groups: 
    - 
      name: "Default"
      state: True
      id: 0
      parent: 0

/cmd_vel_mux/parameter_updates

bools: []
ints: []
strs: 
  - 
    name: "yaml_cfg_file"
    value: "/opt/ros/kinetic/share/turtlebot_bringup/param/mux.yaml"
  - 
    name: "yaml_cfg_data"
    value: ''
doubles: []
groups: 
  - 
    name: "Default"
    state: True
    id: 0
    parent: 0

/diagnostics

监控电池,防撞传感器,数字输出,模拟输入,轮子放掉传感器

header: 
  seq: 40889
  stamp: 
    secs: 1455253026
    nsecs: 782586536
  frame_id: ''
status: 
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Battery"
    message: "Healthy"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Voltage (V)"
        value: "15"
      - 
        key: "Percent"
        value: "60.1613"
      - 
        key: "Charge (Ah)"
        value: "1.32355"
      - 
        key: "Capacity (Ah)"
        value: "2.2"
      - 
        key: "Source"
        value: "None"
      - 
        key: "Charging State"
        value: "Not Charging"
      - 
        key: "Current (A)"
        value: "0"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Watchdog"
    message: "Alive"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Wall Sensor"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "NO"
      - 
        key: "Center"
        value: "NO"
      - 
        key: "Right"
        value: "NO"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Cliff Sensor"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "Reading: 1616  Cliff: NO"
      - 
        key: "Center"
        value: "Reading: 1906  Cliff: NO"
      - 
        key: "Right"
        value: "Reading: 1636  Cliff: NO"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Wheel Drop"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "NO"
      - 
        key: "Right"
        value: "NO"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Motor Current"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "0"
      - 
        key: "Right"
        value: "0"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Motor State"
    message: "Motors Enabled"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "State"
        value: "1"
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Gyro Sensor"
    message: "Heading: 47.51 degrees"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Digital Input"
    message: "[0, 0, 0, 0]"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "mobile_base_nodelet_manager: Analog Input"
    message: "[4095, 4095, 4095, 4095]"
    hardware_id: "Kobuki"
    values: []

/joint_states

轮子关节的位置,速度

header: 
  seq: 2249478
  stamp: 
    secs: 1455253412
    nsecs: 736773438
  frame_id: ''
name: [wheel_left_joint, wheel_right_joint]
position: [544.5388087565079, 423.2924498151988]
velocity: [0.0, 0.0]
effort: [0.0, 0.0]

/diagnostics_agg

监控模拟输入,数字输入,电机,车子上的传感器是否正常工作

header: 
  seq: 45219
  stamp: 
    secs: 1455253559
    nsecs: 712958197
  frame_id: ''
status: 
  - 
    level: 0
    name: "/Input Ports"
    message: "OK"
    hardware_id: ''
    values: 
      - 
        key: "mobile_base_nodelet_manager: Analog Input"
        value: "[4095, 4095, 4095, 4095]"
      - 
        key: "mobile_base_nodelet_manager: Digital Input"
        value: "[0, 0, 0, 0]"
  - 
    level: 0
    name: "/Input Ports/Analog Input"
    message: "[4095, 4095, 4095, 4095]"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "/Input Ports/Digital Input"
    message: "[0, 0, 0, 0]"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "/Kobuki"
    message: "OK"
    hardware_id: ''
    values: 
      - 
        key: "mobile_base_nodelet_manager: Motor State"
        value: "Motors Enabled"
      - 
        key: "mobile_base_nodelet_manager: Watchdog"
        value: "Alive"
  - 
    level: 0
    name: "/Kobuki/Motor State"
    message: "Motors Enabled"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "State"
        value: "1"
  - 
    level: 0
    name: "/Kobuki/Watchdog"
    message: "Alive"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "/Power System"
    message: "OK"
    hardware_id: ''
    values: 
      - 
        key: "mobile_base_nodelet_manager: Battery"
        value: "Healthy"
  - 
    level: 0
    name: "/Power System/Battery"
    message: "Healthy"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Voltage (V)"
        value: "14.8"
      - 
        key: "Percent"
        value: "54.0323"
      - 
        key: "Charge (Ah)"
        value: "1.18871"
      - 
        key: "Capacity (Ah)"
        value: "2.2"
      - 
        key: "Source"
        value: "None"
      - 
        key: "Charging State"
        value: "Not Charging"
      - 
        key: "Current (A)"
        value: "0"
  - 
    level: 0
    name: "/Sensors"
    message: "OK"
    hardware_id: ''
    values: 
      - 
        key: "mobile_base_nodelet_manager: Cliff Sensor"
        value: "All right"
      - 
        key: "mobile_base_nodelet_manager: Gyro Sensor"
        value: "Heading: 17.65 degrees"
      - 
        key: "mobile_base_nodelet_manager: Motor Current"
        value: "All right"
      - 
        key: "mobile_base_nodelet_manager: Wall Sensor"
        value: "All right"
      - 
        key: "mobile_base_nodelet_manager: Wheel Drop"
        value: "All right"
  - 
    level: 0
    name: "/Sensors/Cliff Sensor"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "Reading: 1615  Cliff: NO"
      - 
        key: "Center"
        value: "Reading: 1935  Cliff: NO"
      - 
        key: "Right"
        value: "Reading: 1659  Cliff: NO"
  - 
    level: 0
    name: "/Sensors/Gyro Sensor"
    message: "Heading: 17.65 degrees"
    hardware_id: "Kobuki"
    values: []
  - 
    level: 0
    name: "/Sensors/Motor Current"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "0"
      - 
        key: "Right"
        value: "0"
  - 
    level: 0
    name: "/Sensors/Wall Sensor"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "NO"
      - 
        key: "Center"
        value: "NO"
      - 
        key: "Right"
        value: "NO"
  - 
    level: 0
    name: "/Sensors/Wheel Drop"
    message: "All right"
    hardware_id: "Kobuki"
    values: 
      - 
        key: "Left"
        value: "NO"
      - 
        key: "Right"
        value: "NO"

/mobile_base/commands/controller_info

底盘PID参数控制

rostopic pub /mobile_base/commands/controller_info kobuki_msgs/ControllerInfo "type: 0
p_gain: 0.0
i_gain: 0.0
d_gain: 0.0"

/mobile_base/commands/digital_output

底盘数字IO输出

rostopic pub /mobile_base/commands/digital_output kobuki_msgs/DigitalOutput "values:
- false
- false
- false
- false
mask:
- false
- false
- false
- false"

/mobile_base/commands/led1

控制LED灯

rostopic pub /mobile_base/commands/led1 kobuki_msgs/Led "value: 0" 

/mobile_base/commands/reset_odometry

将消息清0

rostopic pub /mobile_base/commands/reset_odometry std_msgs/Empty "{}"

/mobile_base/commands/sound kobuki_msgs/Sound

小车声音控制

rostopic pub /mobile_base/commands/sound kobuki_msgs/Sound "value: 0"

/mobile_base/events/bumper

rostopic echo /mobile_base/events/bumper
bumper: 0
state: 1
---
bumper: 1
state: 1

/mobile_base/events/button

rostopic echo /mobile_base/events/button
button: 1
state: 1
---
button: 1
state: 0 

/mobile_base/events/cliff

rostopic echo /mobile_base/events/cliff
sensor: 0
state: 1
bottom: 1183

/mobile_base/sensors/imu_data

imu的数据,角速率,线速度,四元数

header: 
  seq: 2629
  stamp: 
    secs: 1455255368
    nsecs: 805674266
  frame_id: "gyro_link"
orientation: 
  x: 0.0
  y: 0.0
  z: -0.0568670389178
  w: 0.998381760593
orientation_covariance: [1.7976931348623157e+308, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.05]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [1.7976931348623157e+308, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.05]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

/odom

里程计信息,输出位置和角度

header: 
  seq: 2337829
  stamp: 
    secs: 1455255323
    nsecs: 683856644
  frame_id: "odom"
child_frame_id: "base_footprint"
pose: 
  pose: 
    position: 
      x: 0.0312459417778
      y: -0.0167542942593
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.0568670389178
      w: 0.998381760593
  covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.05]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

/mobile_base/sensors/core

传感器消息输出

header: 
  seq: 2356190
  stamp: 
    secs: 1455255721
    nsecs: 464043387
  frame_id: ''
time_stamp: 27032
bumper: 0
wheel_drop: 0
cliff: 0
left_encoder: 27750
right_encoder: 42994
left_pwm: 0
right_pwm: 0
buttons: 0
charger: 0
battery: 144
bottom: [1616, 1900, 1635]
current: [0, 0]
over_current: 0
digital_input: 0
analog_input: [4095, 4095, 4095, 4095]

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南山二毛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值