7. Controlling a Mobile Base

单位和坐标系

  • 右手坐标系
  • x 轴指向前方
  • y 轴指向左侧
  • z 轴指向上方
  • 线速度单位:m/s
  • 角速度单位:rad/s
坐标系.png

运动控制层次

base controller:

  • publish: /odom
  • subscribe: /cmd_vel
  • publish: /base_link

move_base:

基于地图的导航、路径规划、移动控制

gmapping

基于激光雷达的 SLAM

amcl

定位

语义控制

“去打瓶酱油”

不同层面的运动控制

通过消息控制小车移动

主题:

  • /cmd_vel

查看 Twist 消息的格式:

 rosmsg show geometry_msgs/Twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z

二轮差速小车只使用:

  • linear.x
  • angular.z
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.2, y:
0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}'

校准

linear 校准

angular 校准

基于时间估计的往返运动

基于里程计的往返运动

基于里程计的往返运动

里程计

 rosmsg show  nav_msgs/Odometry
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
  geometry_msgs/Pose pose
    geometry_msgs/Point position
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion orientation
      float64 x
      float64 y
      float64 z
      float64 w
  float64[36] covariance
geometry_msgs/TwistWithCovariance twist
  geometry_msgs/Twist twist
    geometry_msgs/Vector3 linear
      float64 x
      float64 y
      float64 z
    geometry_msgs/Vector3 angular
      float64 x
      float64 y
      float64 z
  float64[36] covariance

tf tree

rviz 显示 tf tree

基于里程计的画方格运动

基于里程计的画矩形运动

手动控制

  • 键盘
  • 手柄
  • GUI
  • rviz 中操作 (ros-indigo-turtlebot-interactive-markers)

你可能感兴趣的:(7. Controlling a Mobile Base)