Has Matlab ROS2 support for actions and services not been implemented yet?

I am teaching an intro to robotics course for the first time this semester. Eventually we want to shift our undergrad programming courses to Python, but so many are trained on Matlab, that I have allowed the students this semester to use either Python or Matlab for their homework. I also haven't been super specific about whether they have to use ROS1 or ROS2.
I always use Python, but had a couple of students using Matlab come to me and we can't figure out for the life of us how to call services or actions from the Matlab ROS2 interface. It doesn't even seem as if the functionality exists in the documentation. Is their ROS2 implementation currently not feature-full?

 Accepted Answer

Hi Josh Swensen,
It is good to hear that you chose MATLAB to teach robotics course for students.
At this point, ROS Toolbox does not have Services and Actions for ROS2. These features are available for ROS1.
Team is actively working on provding MATALB interfaces for ROS2 Services and Actions in the upcoming releases of MATLAB.
Thank you for your interest.
Jagadeesh

4 Comments

I figured as much. I ended up hacking together a "pass through node" that makes it fairly simple for the students to define whatever Service or Action they want to use and send a String message over a standard topic and then trigger the Service or Action from the appropriate node. It doesn't have the responses from the Actions implemented, but I'm not sure we will need those.
I have contemplated making this semi-autonomous where I can just make a spreadsheet/CSV file and the code on both sides gets auto-generated.
It isn't super elegant, but it works. For anyone else who finds thism you have to rename the Python file from a .txt back to a .py, because MATLAB Answers would let me attach a .py file.
Sorry, second comment, but I tried to download a pre-release of 2021a, and that didn't have Services and Actions either.
You are right John. The requested features will be available in future releases not in R2021a.
That is an unfortunate answer, but I guess an answer nonetheless.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!