Cannot change which *.action my server uses

I start my action server like this now:

self._as = actionlib.SimpleActionServer(
“action_custom_msg_as”, CustomActionMsgAction, self.goal_callback, False)

So it should use CustomActionMsgAction as the goal now, but before I migrated, I was using actionlib/TestActionGoal. But even after I cleaned the build and devel dirs and restarted the action server, I still get:

$ rostopic info /action_custom_msg_as/goal
Type: actionlib/TestActionGoalPublishers: NoneSubscribers:
* /action_custom_msg_as_server (http://1_xterm:46411/)

So somehow the goal type is being cached or something, so it ignores my python script and uses the previous message type, even after I kill the server and do a full clean.

I can get around the problem by simply renaming the service to /action_custom_msg_as2, but I need this to be graded by the automatic grader, so I’m not allowed to change the name.

$ rostopic info /action_custom_msg_as2/goal
Type: actions_quiz/CustomActionMsgActionGoalPublishers: NoneSubscribers:
* /action_custom_msg_as_server2 (http://1_xterm:45589/)

How can I clean this cache, restart roscore, or whatever that I should do?

Hi Chris,

Can you try running this and see if it fixes it (remove cached compile Python files):

cd ~
for f in $(find . -name "*.pyc"); do rm -v $f; done
1 Like

@albertoezquerro found the solution - basically, the server works fine if you send it the correct goal type a single time, manually typing in the msg type using “rostopic pub” with the goal topic. In the end, the system shut down because I logged off for a long time, and when roscore started back up, everything worked fine without even the above fix.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.