Communicate using ROS between 2 different MATLAB versions
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have been trying to use ROS publish and subscribe blocks for communicating between 2 different versions of MATLAB (R2018a and R2022a) on the same computer (same machine). The thing is, I am trying to run experiments on a hardware system that is compatible with R2018a or lower. However, I want to implement Reinforcement learning on the system. RL toolbox is available from R2019a onwards. Hence, I trained my RL agent using R2022a, and now want to deploy the trained agent on the hardware (which interfaces only through R2018a).
The system models, for the hardware interface and the RL agent are in Simulink. So the below description is for Simulink models in the respective MATLAB versions.
I was planning on using ROS publish blocks in R2018a (hardware compatible version) and corresponding subscribe blocks in R2022a (RL agent trained version), both versions on the same computer (my laptop). I thought this way, I will be able to communicate with the hardware using R2018a and recieve the states from the hardware system, which I can publish on a ROS topic. After this, I wanted the subscribe block in R2022a, to subscribe to that ROS topic and recieve the system states which can then be fed to the RL agent. This RL agent can then give out actions, which I planned to communicate the same way (in reverse manner) to the hardware. However, after a lot of tries and going through multiple solutions, I have not been able to figure this out. Any suggestions or ideas are welcome.
6 comentarios
Jagadeesh Konakalla
el 7 de Jun. de 2022
Hi Mohammed,
I have tried on my end and i do not see any issue with communication. Here is what i followed.
- I launched the rosinit from 22a release MATLAB.
- Then i ran the rosinit on 18a MATLAB.
- Simulated the publisher model in 22a release with inf time as Stop time
- Simulated the subscriber model in 18b release with inf time as Stop time.
- I can see that subscriber gets the data published from 22a release MATLAB.
Thanks,
Jagadeesh K
Respuestas (1)
Jagadeesh Konakalla
el 21 de Jun. de 2022
Movida: Remo Pillat
el 1 de Mayo de 2023
Hi Mohammed,
Is the issue resolved on your end ?
In case if the issue is not resolved, Please contact us through the MathWorks Technical Support team for further assitance.
Thanks,
Jagadeesh K.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!