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

set priority on python node

asked 2012-02-08 03:05:42 -0500

Lean2 gravatar image

updated 2014-01-28 17:11:18 -0500

ngrennan gravatar image

How I can change the priority of a node written y python?

Im working with the kinect and a haptic device to be used in the chest of a person, after I get the information about the distance of the object and some processing I want to send it through the serial port to the haptic devic, I realized that I have some delays, so I want to change the priority of xecution of the node or some portion of the node ( written in python) in order to get a behavior close to real time.

edit retag flag offensive close merge delete


Could you explain what you mean by "priority" and what you're trying to accomplish?
DimitriProsser gravatar image DimitriProsser  ( 2012-02-08 03:15:33 -0500 )edit
So you want one node to run before another?
DimitriProsser gravatar image DimitriProsser  ( 2012-02-09 00:38:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-07 07:00:31 -0500

Mac gravatar image

You could use the launch-prefix flag in a .launch file, with a value something like "nice -n -1" (nice being the UNIX command for setting priority).

However, this feels very much like an XY Problem to me; can you edit the question to explain in more detail what you're trying to do? Using nice is a hack; there's probably a better answer.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-02-08 03:05:42 -0500

Seen: 784 times

Last updated: May 07 '12