ROS 2 Custom Action Build: Action type is registered and shows with ROS 2 CLI "interface" command but does not work with CLI "send_goal" command

asked 2022-06-27 10:55:52 -0500

sbrills gravatar image

ROS 2 and Nav2 Version: ROS 2 Galactic
OS: Ubuntu 20.04 Focal Fossa

I am trying to implement the custom sms recovery plugin from the following page:

SMS Tutorial Link

The tutorial is meant for the updated behavior server and not the recovery server, however the earlier commit that works with ROS 2 Galactic can be found here -> SMS Recovery Behavior

Right now I am able to compile the plugin and the sms_recovery plugin is getting loaded correctly. Moreover, the custom action type named "nav2_sms_recovery/action/SmsRecovery" responds with the correct definition when queried using "ros2 interface show" and is pasted below for reference:

string message
builtin_interfaces/Duration total_elapsed_time
int32 sec
uint32 nanosec
# Feedback

The issue happens when I try to send a goal to the recovery server. Using the command below

ros2 action send_goal "send_sms" nav2_sms_recovery/action/SmsRecovery "{message : June }"

gets me an error saying "The passed action type is invalid". I can't figure out why this is the case if the action type is already registered by ROS 2?

edit retag flag offensive close merge delete


I think the problem is related to this answer (Related Answer) in that the executable depends on the generated action message.

Changing the modification time and recompiling seems to make it compile properly but what would be the right way to ensure the executable properly depends on the compiled action message?

sbrills gravatar image sbrills  ( 2022-06-28 13:42:30 -0500 )edit