std_msgs/Header header #消息的报头 uint32 seq time stamp string frame_id #地图消息绑定在TF的哪个frame上,一般为map
nav_msgs/MapMetaData info #地图相关信息 time map_load_time #加载时间 float32 resolution #分辨率 单位:m/pixel uint32 width #宽 单位:pixel uint32 height #高 单位:pixel geometry_msgs/Pose origin #原点 geometry_msgs/Point position float64 x float64 y float64 z geometry_msgs/Quaternion orientation float64 x float64 y float64 z float64 w int8[] data #地图具体信息
exec 2> /tmp/rc.local.log # send stderr from rc.local to a log file exec 1>&2 # send stdout to the same log file set -x # tell sh to display commands before execution
错误日志都在log文件里,第二行是把一般输出也放了进去,有时会很多,这行可以不加。 打开错误日志发现source not found,不识别source,这是shell的原因。把第一行改为#!/bin/bash,也就是换成bash,最终生效了。
uint8 PENDING = 0 # The goal has yet to be processed by the action server uint8 ACTIVE = 1 # The goal is currently being processed by the action server
uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing # and has since completed its execution (Terminal State) uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) uint8 ABORTED = 4 # The goal was aborted during execution by the action server due # to some failure (Terminal State) uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, # because the goal was unattainable or invalid (Terminal State)
uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing # and has not yet completed execution uint8 RECALLING = 7 # The goal received a cancel request before it started executing, # but the action server has not yet confirmed that the goal is canceled uint8 RECALLED = 8 # The goal received a cancel request before it started executing # and was successfully cancelled (Terminal State) uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be # sent over the wire by an action server
// 回调函数是 MoveBase::executeCb as_ = newMoveBaseActionServer(ros::NodeHandle(), "move_base", boost::bind(&MoveBase::executeCb, this, _1), false); ...... //we're all set up now so we can start the action server as_->start();
MoveBase::executeCb函数在move_base693行,过程太复杂,步骤大致如下:
验证目标位姿的欧拉角是否合理
目标位姿转换为全局frame中的位姿
1 2 3 4 5 6
//we have a goal so start the planner boost::unique_lock<boost::recursive_mutex> lock(planner_mutex_); planner_goal_ = goal; runPlanner_ = true; planner_cond_.notify_one(); lock.unlock();
在pf_pdf_gaussian_alloc函数中,对协方差矩阵进行了特征值分解。也就是协方差矩阵cx=cr cd crT ,cd是对角矩阵,取cd的三个对角元素开平方后,传入pf_ran_gaussian函数,作为set_a粒子集的初始化的标准差。yaw的方差在对角矩阵cd里不变,cd的最后一个元素仍然是initial_cov_aa