ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How is better to run the robot / multiple node on one machine

asked 2020-08-21 03:01:53 -0500

Krenshow gravatar image

I am creating a mobile robot. There are several nodes such as SLAM, move_base, LIDAR, RGBD, and some other sensors. I have a couple of ways to run the system. The first one is just to create a single launch file that runs everything. The second way is to create my own node that starts other nodes, checks their working (by checking messages from nodes or just checking node list), and reboots any node if there is a problem (for example, some problem of the camera launch or some node crash). The last way seems more reliable, however, I don't know - is there any common and good way to do it?

Would you like to help me with this question or share your experience?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-08-21 04:32:47 -0500

Delb gravatar image

You can check some launch files tips here, there are some explanations that could help you. Especially the Top-level organization part.

What I would recommend is to have multiples launch file, each of them would be dedicated to a single task and have a (or maybe multiples) top-level launch file that would include all the required launch files. For example don't create a launch file to start a teleoperation and a laser scan filter, those tasks are unrelated.

A common practice is to have a launch file to start everything related to the robot (the mobile base, sensors etc..), you might have already seen some packages made for this, in general their name end with the suffix bringup or core.

Once all the nodes are correctly started, you can launch every node required for your application (mapping, navigation etc..) with another launch file. The benefits of doing so is that if you want to run your application multiple times you don't have to restart the robot, you just kill your application roslaunch and relaunch it.

In the end you can have only one launch file it's just about what you need/want but personnally I prefer to have multiples to improve their readability and reusability.

edit flag offensive delete link more

Comments

Thank you!

Krenshow gravatar image Krenshow  ( 2020-08-25 00:25:28 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-08-21 03:01:53 -0500

Seen: 976 times

Last updated: Aug 21 '20