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

Start Python with Optimizer Flag

asked 2017-07-14 04:54:21 -0600

ricorod gravatar image

Hi together,

is there a possibility to start the nodes that are written in Python with the optimization flag -O?

I want to provide two different builds: debug and release. The optimizer flag should only be set in the release build mode.

Thank you, Best Regards Markus

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-16 04:51:48 -0600

ricorod gravatar image

I've found one solution:

Adding the following attribute to the node in the launch file:

launch-prefix="python $(arg optimization_flags)"


<arg name="optimization_flags" value="-OO" />
edit flag offensive delete link more

Question Tools



Asked: 2017-07-14 04:54:21 -0600

Seen: 210 times

Last updated: Jul 16 '17