# Action server does not finish processing the goal

Hello everyone,

I am trying to simulate a motion planner with Q-learning on an industrial robot using the openai_ros and its iriwam_example packages on Gazebo and facing an issue about handling the goal message between the action client and server. The following lines are the excerpted ones that seem relevant to my issue.

self.client = actionlib.SimpleActionClient('/ns/follow_joint_trajectory', FollowJointTrajectoryAction)
self.client.wait_for_server()   # <- this func returns True

my_goal = FollowJointTrajectoryGoal()
'''
Set the value for every element of my_goal here
'''

self.client.send_goal(my_goal, done_cb=self.foo_done_cb_func, active_cb=foo_active_cb_func, feedback_cb=foo_feedback_cb_func)


You can find almost the same lines in iriwam_env.py of iriwam_example package. At the last line, I set original done_cb, active_cb, and feedback_cb functions. I confirmed that active_cb and feedback_cb were called during the execution of the code. But, done_cb was not called every time.

I modified the code to investigate whether it is just a matter of time as follows:

self.client = actionlib.SimpleActionClient('/ns/follow_joint_trajectory', FollowJointTrajectoryAction)
self.client.wait_for_server()   # <- this func returns True

my_goal = FollowJointTrajectoryGoal()
'''
Set the value for every element of my_goal here
'''

self.client.send_goal_and_wait(my_goal)  # <- modified!


However, Even if waiting for several minutes, the action client seemed not to receive any response from the server and stuck at the line. Because the action server is implemented in the Gazebo, I suppose I have to investigate its codes. But, I am not sure where to start. So, could someone give me any advice? Or, if there is someone who experienced similar situations in the past, I would like to draw on your experience.

My working environment is as follows:

• Hardware: MacbookPro Late 2013,
• OS: (Dualbooted) Ubuntu 20.04,
• ROS dist: Noetic, and
• Gazebo version: 11.