Robotics StackExchange | Archived questions

Problem with publishing a global path on topic /move_base/TrajectoryPlannerROS/global_plan

Hi

I made a small program that publishes a plan on the topic
/movebase/TrajectoryPlannerROS/globalplan

Here goes the idea

for (int i=0; i<10; i++){
geometry_msgs::PoseStamped new_goal ;
tf::Quaternion goal_quat = tf::createQuaternionFromYaw(1.54);

new_goal.header.frame_id="/map";

 new_goal.pose.position.x = GPAS.InitialPoseMessage.pose.pose.position.x+(0.1*i);
 new_goal.pose.position.y = GPAS.InitialPoseMessage.pose.pose.position.x+(0.1*i);

 new_goal.pose.orientation.x = 0;
 new_goal.pose.orientation.y = 0;
 new_goal.pose.orientation.z = 0;
 new_goal.pose.orientation.w = 1;

 plan.poses.push_back(new_goal);
 }

 plan.header.frame_id="/map";

 GPAS.GlobalPlanPublisher.publish(plan); // topic /move_base/TrajectoryPlannerROS/global_plan
 GPAS.NavfnROSPublisher.publish(plan);

When I do rostopic echo /movebase/TrajectoryPlannerROS/globalplan

I can see well the published plan correctly. However, the turtlebot robot does not move and does not follow the plan, although the plan is correctly shown in rviz. I already run amcl and move base launch files and the robot moves if I send a goal from rviz.

i wanted to test of the robot moves if I send a plan instead of a goal.

Do you have an idea what could be the issue? Is it sufficient to make the robot moving by sending a plan in topic /movebase/TrajectoryPlannerROS/globalplan or some configuration need to be made?

Thank you
Anis

Asked by Anis on 2014-01-24 08:04:40 UTC

Comments

Answers

I would like to know how to do this to pre-record a global path for my local_planner to follow.

Asked by ryleymcc on 2021-01-22 01:21:43 UTC

Comments

Please delete your answer and post it as a comment.

Asked by skpro19 on 2021-06-10 14:00:01 UTC