Ask Your Question
1

how does ros schedule nodes

asked 2019-03-25 17:56:08 -0500

zaddan gravatar image

how does ros schedule nodes? is this simply using the linux scheduler?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-25 18:29:26 -0500

ahendrix gravatar image

updated 2019-03-25 22:20:18 -0500

Yes, ROS 1 uses the linux scheduler. By default, roscpp has a background thread to handle socket activity, and processes callbacks serially on the main thread when you can ros::spin() or ros::spinOnce(). You can change how many threads are used by using an async spinner or multithreaded spinner.

You are free to use the linux tools for scheduling to change how linux schedules your processes or threads. (I am not sure about ROS 2 but I think it is the same).

edit flag offensive delete link more

Comments

thanks for the answer. So does ros actually use linux scheduler or it simply stays out of scheduling (and let linux take care the scheduling of nodes, since nodes are processes anyway and hence the unit of scheduling that linux deals with)

zaddan gravatar imagezaddan ( 2019-03-25 21:01:13 -0500 )edit

ROS stays out of scheduling completely.

ahendrix gravatar imageahendrix ( 2019-03-25 22:20:11 -0500 )edit

thanks for the clarification.

zaddan gravatar imagezaddan ( 2019-03-25 22:48:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-25 17:56:08 -0500

Seen: 113 times

Last updated: Mar 25