Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

features::location_provider::PointPDF getAuxLocation();

获取辅助定位信息。

rpos::system::types::_u32 id;
core::Location location;
float circular_error_probability;//range
std::vector<std::string> tags;

...

根据当前辅助定位设备的信息获取当前机器人的大致位置信息。

当机器人被抱起时,可以先调用getAuxLocation()获取机器人当前大致位置信息,然后调用recoverLocalization传入包含有大致位置信息的区域,使机器人尝试重定位。

示例
Code Block
languagecpp
firstline0
linenumberstrue
auto locationPdf = platform. getAuxLocation();
 Location location = locationPdf.location;
 float distant = locationPdf.circular_error_probability;
 RectangleF area((location.x() - distant), (location.y() - distant), 2*distant, 2*distant);
  auto act = platform. recoverLocalization(area);
  act.waitUntilDone();

actions::MoveAction recoverLocalization(const core::RectangleF& area);

当机器人被抱起时可调用此接口进行重定位。设备位置发生意外变化之后,设备会在指定区域内重定位。(如果未指定面积大小,会有一个缺省面积。)

如果area区域为空时,机器人将在当前20*20的区域进行从定位,否则机器人将在指定区域进行重新定位。

features::motion_planner::Path getRobotTrack(int count);(扫地机专用接口)

...