Generating ROS Custom Action Service Messages in R2021a

1 vue (au cours des 30 derniers jours)
Wesley Au
Wesley Au le 17 Mar 2021
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).
cmake_minimum_required(VERSION 3.0.2)
add_compile_options(-std=c++11)
project( ... )
find_package(catkin REQUIRED COMPONENTS
message_generation
roscpp
rospy
std_msgs
geometry_msgs
actionlib_msgs
actionlib
)
find_package(Boost REQUIRED COMPONENTS system)
add_action_files(
FILES
PlanExecute.action
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
actionlib_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime actionlib_msgs
DEPENDS Boost
)

Réponse acceptée

Cam Salzberger
Cam Salzberger le 17 Mar 2021
Modifié(e) : Cam Salzberger le 1 Sep 2021
Hello Wesley,
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.
-Cam
  2 commentaires
Mihael Simonic
Mihael Simonic le 13 Avr 2021
Is there any workaround to use old unoffical version for custom actions?
Cam Salzberger
Cam Salzberger le 1 Sep 2021
Modifié(e) : Cam Salzberger le 1 Sep 2021
This functionality is availabe in R2021b, which is currently in pre-release state. If you have a license to get the pre-release, you can use it now. Otherwise, it will be available when 21b is fully released.
I've updated my answer accordingly.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Custom Message Support dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by