ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

[ERROR] : Called wait_for_result when no goal exists

asked 2022-08-09 06:12:24 -0500

anonymous user


updated 2022-08-09 06:13:41 -0500

This is terminal output:

[ERROR] [1660043302.501132, 4595.399000]: Called wait_for_result when no goal exists

[INFO] [1660043302.505849, 4595.405000]: Goal execution done!

It says Goal execution done but robot is not moving.

Can someone help me please?

from unittest import result
import rospy
import actionlib
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal

class SendGoal():
    def __init__(self):
        self.client = actionlib.SimpleActionClient('move_base',MoveBaseAction)
        self.wait = self.client.wait_for_result()

        self.goal = MoveBaseGoal()
        self.goal.target_pose.header.frame_id = "map"
        self.goal.target_pose.header.stamp =
        self.goal.target_pose.pose.position.x = 30.0
        self.goal.target_pose.pose.orientation.w = 0.01
        self.goal.target_pose.pose.position.y = -10.5

    def movebase_client(self):



        if result:
            print("job done")
        if not self.wait:
            rospy.logerr("Action server not available!")
            rospy.signal_shutdown("Action server not available!")
            return self.client.get_result()

if __name__ == '__main__':
        result = SendGoal().movebase_client()
        if result:
            rospy.loginfo("Goal execution done!")
    except rospy.ROSInterruptException:
        rospy.loginfo("Navigation test finished.")
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-09 07:31:46 -0500

muratcngncr gravatar image

updated 2022-08-09 07:47:32 -0500

Hi Onurcan

You are trying to wait result before sending goal to action server. In here

self.wait = self.client.wait_for_result()

You should do that after sending goal

self.wait = self.client.wait_for_result()

and use self.client.wait_for_result() return for result variable.

In the class init you can use client.wait_for_server() function to wait for server.

edit flag offensive delete link more


Yeah i realized after i posted it but thanks a lot. :)

anonymous userAnonymous ( 2022-08-09 09:45:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-08-09 06:12:24 -0500

Seen: 58 times

Last updated: Aug 09 '22