geometry_msgs 系列
geometry_msgs/Pose
1
2geometry_msgs/Point position
geometry_msgs/Quaternion orientationgeometry_msgs::PoseStamped
1
2std_msgs/Header header
geometry_msgs/Pose posegeometry_msgs::Point
1
2
3float64 x
float64 y
float64 zgeometry_msgs::Quaternion
1
2
3
4float64 x
float64 y
float64 z
float64 wgeometry_msgs/PoseArray
1
2std_msgs/Header header
geometry_msgs/Pose[] posesgeometry_msgs/Pose2D
1
2
3float64 x
float64 y
float64 thetageometry_msgs/Transform
1
2geometry_msgs/Vector3 translation
geometry_msgs/Quaternion rotationgeometry_msgs/PoseWithCovariance
1
2geometry_msgs/Pose pose
float64[36] covariancegeometry_msgs::Polygon
1
geometry_msgs/Point32[] points
tf 系列
以下两个类都继承 tf::Transform
tf::Pose
tf::Stamped
对数据类型做模板化(除了tf::Transform),并附带元素frameid和stamp、setData
成员函数1
2
3
4tf::Stamped<tf::Pose> pose;
getOrigin().getX();
getOrigin().getY();
tf::getYaw(pose.getRotation())
tf::StampedTransform
1 | double x= transform.getOrigin().getX(); |
1 | const geometry_msgs::PoseStamped& pose = ; |
tf::poseStampedMsgToTF
函数,把geometry_msgs::PoseStamped
转化为Stamped<Pose>
PoseSE2
源码在pose_se2.h
,有两个private成员1
2Eigen::Vector2d _position;
double _theta;
支持下列函数:1
2
3
4
5PoseSE2(double x, double y, double theta)
PoseSE2(const geometry_msgs::Pose& pose)
PoseSE2(const tf::Pose& pose)
friend std::ostream& operator<< (std::ostream& stream, const PoseSE2& pose)
另外还支持运算符* + - =
Eigen::Vector2d orientationUnitVec() const
: 获得当前朝向的单位向量
PoseSE2::average(start, goal);
costmap_converter/ObstacleArrayMsg
1 | std_msgs/Header header # frame_id 为map |
类Obstacle
定义在obstacle.h
,派生类有PointObstacle
, CircularObstacle
, LineObstacle
,PolygonObstacle
1
2typedef boost::shared_ptr<Obstacle> ObstaclePtr;
typedef std::vector<ObstaclePtr> ObstContainer;
PoseSequence posevec; //!< Internal container storing the sequence of optimzable pose vertices
TimeDiffSequence timediffvec; //!< Internal container storing the sequence of optimzable timediff vertices
VertexPose
继承g2o::BaseVertex<3, PoseSE2 >
。
This class stores and wraps a SE2 pose (position and orientation) into a vertex that can be optimized via g2o
VertexTimeDiff
继承g2o::BaseVertex<1, double>
。This class stores and wraps a time difference \f$ \Delta T \f$ into a vertex that can be optimized via g2o
判断初始化:bool isInit() const {return !timediff_vec_.empty() && !pose_vec_.empty(); }
TimedElasticBand::clearTimedElasticBand()
: 清空 timediffvec posevec
addPoseAndTimeDiff
: Add one single Pose first. Timediff describes the time difference between last conf and given conf”;