39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/*********************************************************************
|
|
*
|
|
* Software License Agreement (BSD License)
|
|
*
|
|
* move_base2 — cổng lấy pose robot.
|
|
*
|
|
* Author: DuongTD
|
|
*********************************************************************/
|
|
#ifndef MOVE_BASE2_PORTS_POSE_PORT_H_
|
|
#define MOVE_BASE2_PORTS_POSE_PORT_H_
|
|
|
|
#include <robot_geometry_msgs/PoseStamped.h>
|
|
|
|
namespace move_base2
|
|
{
|
|
|
|
/**
|
|
* @class PosePort
|
|
* @brief Nguồn pose robot trong global frame.
|
|
*
|
|
* Ở runtime thật, hiện thực bọc Costmap2DROBOT::getRobotPose (đã bao gồm tra TF và kiểm
|
|
* transform_tolerance). Trong test, hiện thực là fake bơm pose theo kịch bản.
|
|
*
|
|
* @invariant Trả false nghĩa là "không biết robot đang ở đâu" — TF thiếu, TF quá hạn, hoặc frame
|
|
* chưa sẵn sàng. Bên gọi PHẢI dừng an toàn, không được dùng pose cũ để đi tiếp.
|
|
* @p pose không được ghi khi hàm trả false.
|
|
*/
|
|
class PosePort
|
|
{
|
|
public:
|
|
virtual ~PosePort() = default;
|
|
|
|
virtual bool getRobotPose(robot_geometry_msgs::PoseStamped& pose) const = 0;
|
|
};
|
|
|
|
} // namespace move_base2
|
|
|
|
#endif // MOVE_BASE2_PORTS_POSE_PORT_H_
|