Generating ROS Custom Action Service Messages in R2021a
6 views (last 30 days)
My project has a custom message structure for an action service that needs compiling in MATLAB. This works perfectly fine in R2020a using the ROS Custom Message toolbox.
Now I understand R2020b+ has changed things around. I'm currently using R2021a, and with the new version all my custom messages and service messages compile completely fine except custom action service messages. They're basically ignored so I'm unable to create a client to my action service due to the missing custom messages. All other messages seem to work fine.
Has anyone else had this issue? Do I need to make any modifications to my CMakeLists.txt to get the new rosgenmsg() to work? My .action files are in the "action" folder, in the same level as "msg" and "srv" folders.
Here's an excerpt of my CMakeLists.txt in case someone can point out missing dependencies for action servers (snipped irrelevant parts).
project( ... )
find_package(catkin REQUIRED COMPONENTS
find_package(Boost REQUIRED COMPONENTS system)
CATKIN_DEPENDS message_runtime actionlib_msgs
Cam Salzberger on 17 Mar 2021
Edited: Cam Salzberger on 1 Sep 2021
In R2020a and before, custom actions were not officially supported for ROS Toolbox. It's noted in the documentation here:
"ROS actions are not currently supported and will be ignored during the custom message generation."
Unofficially, it seems that actions worked to a certain extent if the package files were created correctly. In R2020b and R2021a, only officially-supported features were included when the custom message workflow was revamped.
Custom actions are available in R2021b.
As an FYI, in R2020b+, there is no need to use a package.xml or CMakeLists.txt file for the custom message folder. Those files are ignored, as MATLAB generates its own based on the dependencies specified within the message definitions.