Suggestions for a new simulation architecture

asked 2021-02-27 11:07:57 -0500

Gustavo Lima gravatar image

Hi everyone.

I'm starting to work with robotics and i need some tips from someone who has more experience on this area...

I'm build a simulator which works on a high level of abstraction, but with comunication to a ROS2 package via some kind of middleware.

To start the interface with ROS, i started first building this listener/talker example from documentation:

In this simple example, both talker and listener just exchange one type of message, through one topic.

Now, here's where i need your help. I got two questions:

1 - If i had multiple types of message to be exchange (like reading multiple sensors and actuators), from a architecture point of view, what makes more sense, just one talker and listener code that has all the code for dealing with all those messages, probably dealing with different topics? Or maybe 1 talker and 1 listener for each topic that i have to deal?

2 - Again, from a architecture point of view, if i have to deal with multiple robots, being real or simulated, what makes more sense, a single talker node that receives information from the simulation (making the interface between the simulation and ROS) and send messages to all the robots (via ROS topic), and each robot has a listener, or a listener and a talker for each robot?

I'm trying to build something that would make sense to be used in scenarios more close to the ones that robot builders are familiar to deal with.

Any help/experience will be appreciated. Thanks!

edit retag flag offensive close merge delete