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

How do I run different ros nodes on different cpu cores simulatenously?

asked 2022-07-12 14:12:54 -0600

aiskurt gravatar image

for speeding up the project using different nodes, nodes may use the same core and it is causing a slowing down issue, I want to be reassured that this is not the root cause for slowing down if they run on different cores.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-07-15 03:22:19 -0600

Per Edwardsson gravatar image

ROS is not special in terms of cpu usage. It does not control which core does what job, your OS will manage that via a scheduler. If the scheduler was the problem, you would notice it on all other applications. See stackoverflow.

However, you can allow ROS to use multiple threads. This is done via specifying the executor for your nodes, see documentation on executors, and in turn their callback groups. There was a recent writeup on how it works, I recommend reading it if you are interested in it.

edit flag offensive delete link more
-1

answered 2022-07-14 08:44:18 -0600

BlakeAnderson gravatar image

Use htop to view your per-core load.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-07-12 14:12:54 -0600

Seen: 328 times

Last updated: Jul 15 '22