unable to connect 2 turtlebot3-burger with Simulink using ros subscribe block

2 ビュー (過去 30 日間)
Hemant Pandey
Hemant Pandey 2023 年 11 月 26 日
コメント済み: Hemant Pandey 2023 年 11 月 28 日
I am trying to connect ot 2 turtlebots with different ROS_MATER_URI using subscribe block however I am unable to do so as subscribe block "configure network address" setting are uniform and no 2 blocks can have differnt ip for ROS_MASTER_URI is there way to move forward in the simulink itself I am not looking for solution where ros bridge or similar settings are used. I am using windows 10 matlab r2022b.
Thank you for help

採用された回答

Josh Chen
Josh Chen 2023 年 11 月 27 日
Hi Hemant,
Do you need to control those two turtlebots with different ROS_MASTER_URI with one single Simulink model? If yes, could you elaborate more about why they have to be controlled within the same Simulink model?
As you may already found by yourself, there is no way to set two different ROS_MASTER_URI in one MATLAB session, even if you open two separate Simulink.
Based on what I saw from your problem statement, here are two options you may try:
  1. Instead of using two ROS_MASTER_URI, put the two turtlebots in the same ROS_MASTER_URI and distinguish them by putting into different namespace - this way, you just need to give different topic name with namespace infront.
  2. You can also open two MATLAB sessions and set different ROS_MASTER_URI as shown below:
Hope that helps,
Josh
  1 件のコメント
Hemant Pandey
Hemant Pandey 2023 年 11 月 28 日
Hello Josh,
Thank You for your answer.
1st I am making a distributed control sytem(partially) so I needed to get both bots information of state and simultaneously being able to send them command, I was also using lidar, camera as sensors for using SLAM and navigation. This was increasing load on 1rpi(which I was setting as Master for both the bots) so I was trying to find a way so I can use both the rpi's individually without using a central master(and others with namespace).
They needed to be in same model for inner and outer loop to work properly that's why I was trying to explore the possibility till I can upgrade my central PC to take all load.
Regards,
Hemant

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by