MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / Pose2GlobalFrame

Method Pose2GlobalFrame

roborts_costmap/src/costmap_interface.cpp:407–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407geometry_msgs::PoseStamped CostmapInterface::Pose2GlobalFrame(const geometry_msgs::PoseStamped &pose_msg) {
408 tf::Stamped<tf::Pose> tf_pose, global_tf_pose;
409 poseStampedMsgToTF(pose_msg, tf_pose);
410
411 tf_pose.stamp_ = ros::Time();
412 try {
413 tf_.transformPose(global_frame_, tf_pose, global_tf_pose);
414 }
415 catch (tf::TransformException &ex) {
416 return pose_msg;
417 }
418 geometry_msgs::PoseStamped global_pose_msg;
419 tf::poseStampedTFToMsg(global_tf_pose, global_pose_msg);
420 return global_pose_msg;
421}
422
423void CostmapInterface::ClearCostMap() {
424 std::vector<Layer *> *plugins = layered_costmap_->GetPlugins();

Callers 1

PlanThreadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected