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

Assigning ROS nodes located in a launch file to a certain CPU core [closed]

asked 2019-03-22 16:27:43 -0500

karFAR gravatar image

is it possible to run all ROS operations (Running a ros launch file from a python script which contains running gazebo simulation for a certain robot in addition to it's controllers) and sticking it on a single core ? the drive for such question is to parallelize the simulation of multiple robots separately on different cores for development of distrusted reinforcement learning algorithms i'm running ros kinetic on ubuntu 16.04

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2019-03-25 04:21:30.185828

Comments

This is a duplicate of #q202712 and #q311449 (which @ahendrix also answered).

gvdhoorn gravatar image gvdhoorn  ( 2019-03-25 04:21:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-22 17:10:14 -0500

ahendrix gravatar image

ROS doesn't provide any native tools for pinning tasks to CPUs, but it doesn't fight the existing tools either.

There is a general-purpose linux tool called taskset which can pin tasks to CPUs, and I've used it with ROS quite successfully in the past. You could probably use it in your startup script to limit each launch file to a single core.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-22 16:27:43 -0500

Seen: 769 times

Last updated: Mar 22 '19