Unbound Frontier_exploration [closed]

asked 2015-05-11 03:44:42 -0500

Swan Baigne gravatar image

updated 2015-05-13 05:22:53 -0500

Hello, I am curently working on a turtlebot with ubuntu 14.04 LTS and ROS Indigo, and i am trying to use send the frontier_server an actionlib goal to do unbound exploration. My problem is that when the explore_server receive my goal it say that "couldn't transform from map to U+0001 Failed to set region boundary" From the explore_server code it seems that the problem come from the updateBoundaryPolygon service, but i don't really know what the problem is.

Here is the code i use as actionlib single goal client

#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <test_client/ExploreTaskAction.h>

int main (int argc, char **argv)
{
  ros::init(argc, argv, "frontier_exploration_client");

  // create the action client
  // true causes the client to spin its own thread
  actionlib::SimpleActionClient<test_client::ExploreTaskAction> ac("explore_server", true);

  ROS_INFO("Waiting for action server to start.");
  // wait for the action server to start
  ac.waitForServer(); //will wait for infinite time

  ROS_INFO("Action server started, sending goal.");
  // send a goal to the action
  test_client::ExploreTaskGoal goal;
  goal.explore_boundary.header.seq = 1;
  goal.explore_boundary.header.frame_id = 1;
  goal.explore_center.point.x = 1;
  goal.explore_center.point.y = 0;
  goal.explore_center.point.z = 0;
  ac.sendGoal(goal);

  //wait for the action to return
  bool finished_before_timeout = ac.waitForResult(ros::Duration(30.0));


  if (finished_before_timeout)
  {
    actionlib::SimpleClientGoalState state = ac.getState();
    ROS_INFO("Action finished: %s",state.toString().c_str());
  }
  else
    ROS_INFO("Action did not finish before the time out.");

  //exit
  return 0;
}

Any clues on where i made a mistake ?

EDIT : Ok, problem solved, the cause was the header that was badly configured : it need to be goal.explore_boundary.header.frame_id = "map" to work. The problem now is that the frontier explorer node only give goals that are at the robot's position, resulting in the robot staying at his initial position.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Swan Baigne
close date 2015-05-18 01:24:06.865933

Comments

1

Will need a lot more information than that to find out why your robot is staying at the initial position. I suggest you answer and resolve this question with the frame_id info, and make a new question regarding the new issue.

paulbovbel gravatar imagepaulbovbel ( 2015-05-14 13:37:50 -0500 )edit

Hi! Can you please tell me what the test_client is? I thought that ExploreTaskAction.h was a part of the Frontier Exploration package.

(I'm referring to this line - #include <test_client exploretaskaction.h=""> )

Sidd gravatar imageSidd ( 2015-09-04 10:23:40 -0500 )edit

Hello, ExploreTaskAction.h is indeed part of the Frontier Exploration package, i just took it and put it on my own package to test only the sending of a goal.

Swan Baigne gravatar imageSwan Baigne ( 2015-10-05 03:06:52 -0500 )edit