frontier_exploration server issue

asked 2016-04-09 13:45:29 -0600

naqi.nick gravatar image

hello! i am using frontier_exploration package available on the roswiki website while i run the no_global_map launch file it doesn't work i edited the both file the client and the server file and found out that the program gets stuck at the if condition i.e if(!move_client_.waitForServer() || !updateBoundaryPolygon.waitForExistence() || !getNextFrontier.waitForExistence()) nothing happens when it comes at this line while i did manual debugging i inserted three ROS_INFO statements one before this if condition the second inside the if condition and the third after this if condition only the first ROS_INFO statment executes the second and the third both did not execute and nothing happened i am just stuck at this point can someone tell me what is wrong with this statement i seriously need help

edit retag flag offensive close merge delete

Comments

I'm not familiar with this code, but my general approach would be to take each of the three pieces of that if statement, and figure out if they're true or not. That will tell me which one is failing, and I then I would explore what that condition is trying to check and why it fails.

ahendrix gravatar image ahendrix  ( 2016-04-10 01:48:35 -0600 )edit

yes i tried it when is split the if in 3 if and else statements even then non of the conditions work i even checked them one by one even then it was of no use i dont know what am i missing over here anyone who has gone through the frontier_exploration package!

naqi.nick gravatar image naqi.nick  ( 2016-04-10 12:29:23 -0600 )edit

thanks for the reply ahendrix

naqi.nick gravatar image naqi.nick  ( 2016-04-10 12:29:54 -0600 )edit

i think there is some problem with the move_client_ client and the UpdateBoundaryPolygon service + getNextFrontier service

naqi.nick gravatar image naqi.nick  ( 2016-04-10 12:31:31 -0600 )edit

but i dont know what is the problem

naqi.nick gravatar image naqi.nick  ( 2016-04-10 12:31:46 -0600 )edit

It sounds like move_client_.waitForServer() is blocking. (not returning). You should figure out what the C++ type for move_client_ is and try to look at the docs (or source code) for its waitForServer method. Hopefully that will give you some hint as to why it is blocking.

ahendrix gravatar image ahendrix  ( 2016-04-10 15:53:32 -0600 )edit

Yes it is waiting for the server to reply but i can figure out why isn't the server responding to the client actually there the server has been run in another class but i dont know wither the object of that class has been created or not cuz i dont see any initials of that class in the explore_servr

naqi.nick gravatar image naqi.nick  ( 2016-04-28 15:43:58 -0600 )edit

nor in the explore_client.cpp files as they are the executables but the third class in not the executable where the servers have been created

naqi.nick gravatar image naqi.nick  ( 2016-04-28 15:46:16 -0600 )edit