Generating ROS Custom Action Service Messages in R2021a

조회 수: 1 (최근 30일)
Wesley Au
Wesley Au 2021년 3월 17일
편집: Cam Salzberger 2021년 9월 1일
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
)

채택된 답변

Cam Salzberger
Cam Salzberger 2021년 3월 17일
편집: Cam Salzberger 2021년 9월 1일
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
Mihael Simonic
Mihael Simonic 2021년 4월 13일
Is there any workaround to use old unoffical version for custom actions?
Cam Salzberger
Cam Salzberger 2021년 9월 1일
편집: Cam Salzberger 2021년 9월 1일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Custom Message Support에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by