Hi all,
I apply move_base tutorial to a Pioneer 3DX robot for a university project. My project create a costmap, search object into the scene and set goal that the robot have to reach.
My problem is the follow: when I set the goal by code, local planner doesn't work. Topic /move_base/NavfnROS/plan publish empty messages, while /move_base_simple/goal is set correctly.
But, if I set goal pose with Rviz (with 2D Nav Goal button), all is working properly.
Anyone know what I do wrong? Here my configuration file for move_base:
...
and here the way to publish goal by code:
...
goal_pub_ = nh_.advertise(goal_topic, rate);
geometry_msgs::PoseStamped goal;
goal.header.stamp = ros::Time::now();
goal.header.frame_id = "/map";
goal.pose.position.x = object_centroid[0]+object_max[0]-object_min[0]+distanceFromObjectX;
goal.pose.position.y = object_centroid[1];
goal.pose.position.z = object_centroid[2];
goal.pose.orientation.x = 0.0;
goal.pose.orientation.y = 0.0;
goal.pose.orientation.z = 1.0;
goal.pose.orientation.w = 0.0;
goal_pub_.publish(goal);
Thanks
↧