Robotics StackExchange | Archived questions

ROS Action translator node

Hello everybody,

For a personal project, I want to create a ROS action translator node that will works as a middle person :

I want to do that for a predefined list of words that I have with it's translation, something like this but in an XML file probably :

Do you have any idea how I can perform that in a good way ? or I must do a string comparison for each word received with all my list till I found the right one ?

Thank you

Asked by Spyro on 2022-04-10 04:08:28 UTC

Comments

Anyone please ?

Asked by Spyro on 2022-04-11 11:31:01 UTC

Answers

Why wouldn't a standard Python dictionary and a sub-pub "repeater" node be enough?

Asked by ljaniec on 2022-04-11 17:32:57 UTC

Comments

Because I have to do it using an xml file. But could you please explain you suggestion, I am still curious about it (I am a beginner).

Thank you

Asked by Spyro on 2022-04-12 11:24:54 UTC

You can implement similar functionality with XML too, by mapping etc. You should read more about ROS subscribers and publishers - you can then use e.g. this tutorial: https://roboticsbackend.com/oop-with-ros-in-python/ for a base

Asked by ljaniec on 2022-04-12 12:24:38 UTC