ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

what is the meaning of transformGlobalPlan in goalfunction.cpp line 80

asked 2017-09-12 01:32:29 -0500

updated 2021-07-15 13:46:44 -0500

/**

  • @brief Transforms the global plan of the robot from the planner frame to the frame of the costmap,

  • selects only the (first) part of the plan that is within the costmap area.

  • @param tf A reference to a transform listener
  • @param global_plan The plan to be transformed
  • @param robot_pose The pose of the robot in the global frame (same as costmap)
  • @param costmap A reference to the costmap being used so the window size for transforming can be computed
  • @param global_frame The frame to transform the plan to
  • @param transformed_plan Populated with the transformed plan */

bool transformGlobalPlan(const tf::TransformListener& tf,

const std::vector<geometry_msgs::PoseStamped>& global_plan,
  const tf::Stamped<tf::Pose>& global_robot_pose,
  const costmap_2d::Costmap2D& costmap,
  const std::string& global_frame,
  std::vector<geometry_msgs::PoseStamped>& transformed_plan);

what is the meaning of this function? I have got the global_plan from the globalPlanner in the global_frame,have I? Why and when should I call this function? and what is "the planner frame",Does it equal to the global_frame?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-09 21:58:44 -0500

now , I have figure it out . I found that if you already had a plan in global_frame not in odom_frame and you can use that plan for base_local_planner directly . the lookuptranform() and tranform is not necessary

edit flag offensive delete link more

Comments

You would also need to prune the global plan according to the size of the local costmap.

skpro19 gravatar image skpro19  ( 2021-07-15 13:44:24 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-09-12 01:32:29 -0500

Seen: 229 times

Last updated: Jan 09 '18